Hello,
I'm fairly new to vb.net and have a question I can't find an answer to. The site I'm working on is complex, but to keep things simple here's the basic problem.
I have a site designed with a textbox on the default.aspx page, and I have a class in the App_Code folder (class1.vb). When the class1.vb code runs I need it to read the text from the textbox (i.e. theText = TextBox1.Text), but Visual Studio underlines TextBox1 in blue saying 'Name 'TextBox1' is not declared'. I understand that TextBox1 exists on the default.asp page and the class obviously can't see it. My question is, how can I make the class1.vb code see the textbox so I can retrieve text from it? Ultimately I will need to get all sorts of information from default.aspx when the class runs, but finding a solution to this one textbox should allow me to 'connect' to all the other controls on my page and make use of their values with the class runs. Thanks. Mark.
I'm fairly new to vb.net and have a question I can't find an answer to. The site I'm working on is complex, but to keep things simple here's the basic problem.
I have a site designed with a textbox on the default.aspx page, and I have a class in the App_Code folder (class1.vb). When the class1.vb code runs I need it to read the text from the textbox (i.e. theText = TextBox1.Text), but Visual Studio underlines TextBox1 in blue saying 'Name 'TextBox1' is not declared'. I understand that TextBox1 exists on the default.asp page and the class obviously can't see it. My question is, how can I make the class1.vb code see the textbox so I can retrieve text from it? Ultimately I will need to get all sorts of information from default.aspx when the class runs, but finding a solution to this one textbox should allow me to 'connect' to all the other controls on my page and make use of their values with the class runs. Thanks. Mark.
Comment