i have a textbox whose property i need to set as readonly…
how to set that?
I tried
document.getElementbyid("txtbox").readonly=true;
document.getElementbyid("txtbox").disable=true;
document.getElementbyid("txtbox").setattribute("readonly","readonly");
all these are not working for me.
Disable is working but that is passing the control values as null to the database…again that is a problem for me..
You can set an ASP.NET textbox readonly through javascript.
Here is how:
Hope it’ll help you.