I have designed a view using some of the Kendo Telerik controls. I am not sure how to bind their controls to data.
This generated scaffolded method works :
@Html.EditorFor(model => model.surName, new { htmlAttributes = new { @class = "form-control" } })
How do I bind the Kendo Textbox?
@(Html.Kendo().TextBox()
.Name("fName")
.HtmlAttributes(new { placeholder = "First Name", required = "required", validationmessage="Enter First Name" })
)
Use the Kendo().TextBoxFor
method:
@(Html.Kendo().TextBoxFor(model => model.FirstName)
.Name("fName")
.HtmlAttributes(new { placeholder = "First Name", required = "required", validationmessage="Enter First Name" })
)