Hi,
I have an ascx web user control page. In that, I am having one text box server control. In the javascript file inside the ascx file, I am trying to access the textbox as :
document.getElementById('txtAddCode').value=var_Amtcode;
When I add this ascx to another aspx page and try to call the javascript method, the above line retuens an error becoz document.getElementById returns null.
If the textbox is an HTML control, it works fine. But I need this as a server control only. Even if I select the textbox as "run as server control", then also the error comes.
How to solve this issue ?
Thanks in advance...




Reply With Quote