Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_Default' does not contain a definition for 'TextBox2' a
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Divers
Thread ID:
01426054
Message ID:
01426101
Vues:
17
>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.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform