title: MVC 3 html.TextBoxFor readonly Properties to be set dynamically
body: <pre><code>    &lt;div class="editor-label" style="position:static"&gt;
          &lt;%: Html.LabelFor(Model =&gt; Model.Date, "Date")%&gt;
          &lt;span style="padding-left:52px"&gt;
              &lt;%: Html.TextBoxFor(Model =&gt; Model.Date)%&gt;
  </code></pre>
  
  <p>Here i want to set the readonly property to the textbox on a button click/Action Click. how do i do it.
  At the initial page the data is been displayed as readonly and on the edit button click. This should be changed to editable textbox.I have almost seven textboxes i need to do the same for all.</p>