c# - making a text field read only -


I am using the code below to read only the text entry, but this is not read only This is why

  @ Html.EditorFor (model => model.UserName, new {readonly = "readonly"})    

why you use

  @ Html.EditorFor (model => model UserName, new {@readonly = true}); Using   

or you

  @ Html.EditorFor (model => model.UserName, new {@readonly = "readonly"}) Can;    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

java - Reaching JTextField in a DocumentListener -

c# - Add Image in a stackpanel based on textbox input -