Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot find control-name in control-parameter
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01407076
Message ID:
01407952
Vues:
30
Paul, unfortunately your suggestion doesn't work. When I entered cUserId = Me.Page.RoundPanel1.FindControl("HIddenField1").UniqueId, I got the squiggly blue line under it and when I hovered the mouse over it, it said that RoundPanel1 is not a member of class Page. This is so frustrating! Everything I try fails. It shouldn't be this difficult, should it?

Dana

>>Paul, thank you...would you happen to have the vb.net translation of this? I am really trying to find my way around. I have one hidden field and the rest are textbox controls. It stops on the first one. I have tried your suggestion but in vb.net, inside the class but before the Page_Load as follows:
>>
>>Public cUserId As String = ""
>>
>>Then inside the Page_Load just before the SqlDataSource1.Select() command:
>>
>>cUserId = Me.Page.FindControl("HiddenField1").UniqueID
>>
>>Before I tried it all in one swipe at the top. I get the same error either way, at the place where I try to assign the UniqueID, no matter where that is.
>>
>
>
>Public ReadOnly Property SomeControlUniqueID As String
>   Get
>       Return Me.SomeControlName.UniqueID
>   End Get
>End Property
>
>
>FindControl isn't recursive - so if HiddenField1 is inside of another control (for example, a UserControl, or in your case it sounds like the control the adds the rounded edges), you need to call the FindControl on it instead, ex.
>
>
>   cUserId = Me.Page.NameOfRoundedControl.FindControl("HiddenField1").UniqueID
>
Where's the damned Any Key?...too late
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform