Ho creato una casella di testo usando Razor e provando a impostare value
come segue.Come impostare il valore in @ Html.TextBoxFor nella sintassi del rasoio?
@Html.TextBoxFor(model => model.Destination, new { id = "txtPlace", value= "3" })
Ho provato aggiungendo value
con @
@Html.TextBoxFor(model=> model.Destination, new { id = "txtPlace", @value= "3" })
anche se rende html input
tag con vuoto value
<input id="txtPlace" name="Destination" type="text" value
class="ui-input-text ui-body-c ui-corner-all ui-shadow-inset ui-mini" >
cosa sto facendo male?
possibile duplicato (http://stackoverflow.com/questions/3034986/how-to -set-a-valore-predefinito-con-html-textboxfor) –