title: Can user change input from readonly to editable?
body: <p>I'm using MVC for my data entry form and I have the following div:</p>
  
  <pre><code>&lt;div&gt;
        &lt;label&gt;Bar Code:&lt;/label&gt;
        @if (Model.GiftCardId == default(int))
        {
          @Html.TextBoxFor(model =&gt; model.BarCode)
        }
        else
        { 
          @Html.TextBoxFor(model =&gt; model.BarCode, new { @readonly="readonly"})
        }
  &lt;/div&gt;
  </code></pre>
  
  <p>Here, I'm making sure that if the user is entering a new gift card, an editable input is displayed to allow the user to enter a new bar code. But if the user is editing an existing gift card, the input must display as a readonly input. My question is: can the user alter the readonly attribute of the barCode input and allow himself to enter a different one? The BarCode field is not the primary key in the table but it must be unique. I use the GiftCardId field to identify the record. But then, what's to stop the user from changing the GiftCardId as well when submitting the form? How can this be controlled?</p>