How to set value in @Html.TextBoxFor in Razor syntax?
The problem is that you are using a lower case v. You need to set it to Value and it should fix your issue: @Html.TextBoxFor(model => model.Destination, new { id = “txtPlace”, Value= “3” })
The problem is that you are using a lower case v. You need to set it to Value and it should fix your issue: @Html.TextBoxFor(model => model.Destination, new { id = “txtPlace”, Value= “3” })
Usually you would use one or the other, not both. Readonly allows users to focus on the textbox to copy text or trigger an event. Readonly fields will be posted with the form. With a disabled field, users cannot give focus to the textbox and the field will NOT be posted with the form. Which … Read more