dinedine007
dinedine007

Reputation: 13

vb.net passing a value of text box to a variable

Dim SecondName As String = SecondNameTxtBox.text()

Is the above statement a correct one?

Here I want to assign the value of the text box into tat "SecondName". If it's wrong, please tell me the correct way to write this statement.

Upvotes: 1

Views: 3175

Answers (1)

Joel Coehoorn
Joel Coehoorn

Reputation: 415790

No, it is not correct. SecondNameTxtBox.Text is a property, not a method, so leave off the parentheses.

Upvotes: 4

Related Questions