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”);