document.getelementbyid('txtbox') is not working when I used in content page as it is working in the normal web page. The value is null when it is used in contentpage. Plz anybody help me
document.getelementbyid(‘txtbox’) is not working when I used in content page as it is working
Share
The id will have changed, you can use something like:
document.getelementbyid(<%=txtTextBox.ClientID%>).value
or you can view the source to get the id in the hopes that it will not change again.
If you have the option I’d switch to some other engine, such as asp.net mvc where you have control over the HTML.