Skip to content

Html Readonly is really Readonly now in Asp.Net 2

I have finally got to the bottom of my supposed javascript problem. It was one of those problems where the actual cause was not where you were making the changes.

It seems that ASP.NET team have locked down the readonly html property in ASP.NET version 2. I had been using the readonly property to stop users from editing a text box control, however I was adjusting the value using javascript. Well, now it seems this is no longer possible.

Its good from a "cross side scripting protection" point of view, but bad when it breaks your tests and your integrated build.

Jerry Sherman has a solution if you want to replicate the asp.net 1.1 behaviour.

Posted in Development