ReadOnly TextBox ASP.NET 2008 Can’t be set using js

October 8, 2008

I Tried to create a ReadOnly TextBox in a webpage but when I am trying to set its Text property I can’t see the value in the server side.

To walk arround this issue I added the attribute this way:

txt1.Attributes.Add(“ReadOnly”, “true”);