Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

ASP.NET MasterPage getElementById

5.00/5 (1 vote)
27 May 2011CPOL 9.4K  
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)