Wednesday, 16 January 2013

Retain the value of a Read-Only Textbox after Postback


Tto retain the value of a readonly textbox after postback use the following line of code:

txtBox.attributes.add(“readonly”,”readonly”);

in the back-end code instead of writing "readonly" in HTML.

No comments:

Post a Comment