Posts Cannot read value from readonly textbox
Post
Cancel

Cannot read value from readonly textbox

While working on the project we came across a problem that, we were not able to read value of read only text box, i.e. TextBox1.Text returned nothing even when the text box had value.

On googling, I found after doing this you can make your text box read only and also it will return the value of the text box. You need to insert this line on your Page_Load

TextBox1.Attributes.Add(“readonly”, “true”);

This post is licensed under CC BY 4.0 by the author.