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:
01407512
Vues:
38
>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
-Paul

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

Click here to load this message in the networking platform