ClientID for a control inside User Control

Assume that you have a user control with ID  “Login-Control” on a page. In that login control you might be having two text boxes (TB1, TB2) and two lables (LB1, LB2) and one button(BT1). If you want to get the clientID for TB1 at the page level you can’t use like <%= TB1.ClientID %> (It does not work). Here you should go for the following statement:

Login-Control.FindControl(“TB1″).ClientID

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.