Model Binding With Disabled Textbox

前端 未结 7 1993
余生分开走
余生分开走 2020-12-09 07:23

I have a textbox that I am defining as

<%= Html.TextBox(\"Username\", Model.Form.Username, 
        new { @class = \"textbox\", @disabled = \"disabled\" }         


        
相关标签:
7条回答
  • 2020-12-09 08:09

    @readonly = true does not work on my page. I did additional research. Here is the article that explains it

    ReadOnly attribute doesn't work in ASP.NET MVC Models

    0 讨论(0)
提交回复
热议问题