Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: C#
Expertise: Intermediate
May 4, 2005

Manage User Control Values Using Javascript in an .aspx File

Suppose you have a user control named TestControl in your .aspx page. Further, suppose that TestControl contains a textbox named txtFirstName.

To access txtFirstName in your aspx page using JavaScript, use:


    document.forms[0]['TestControl:txtFirstName'].value 
To set txtFirstName, use:

    document.forms[0]['TestControl:txtFirstName'].value = 'Naveena'

Santhi Maadhaven
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap