torstai 25. kesäkuuta 2015

ASP.net MVC5 - DefaultValue

Html- sivulla kentälle saa helposti asetettua oletusarvon esim. :

            @Html.RequiredLabelFor(model => model.SUM)
            @Html.EditorFor(model => model.SUM, new { htmlAttributes = new { @Value = 0.00  } })
            @Html.ValidationMessageFor(model => model.SUM, "", new { @class = "text-danger" })

Ei kommentteja:

Lähetä kommentti