Click here to Skip to main content
15,860,943 members
Articles / Web Development / ASP.NET
Alternative
Tip/Trick

ASP.NET MasterPage getElementById

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
27 May 2011CPOL 9.2K   1  
DescriptionY...

Description


You can use JavaScript to get the same (ID of the control).

Code


var vtxtDate = document.getElementById('<%=txtDate.ClientID %>');

Further Reading


Control.ClientID Property[^]
ClientID vs. UniqueID[^]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --