Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Default' does not contain a definition for 'TextBox2' a
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Miscellaneous
Thread ID:
01426054
Message ID:
01426112
Views:
18
>>I think "this" in your _click method refers to the Button class. And the button class does not have TextBox2 (the page class does). Have you tried to change your code to
>>
>>string mouserpass = this.text;
>>
>>
>>Just a guess but I thought you might want to look into this.
>>
>
>Actually, that's not really how it works in ASP.NET. Controls aren't nested in the same way they would be in VFP. Controls are added to a collection of the container they are on. When you hook up an event, it is added at the container level (usually a page/class) so "this" always refers to the container not the control that raised the event.

My mistake. Thank you for correcting me.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform