Hi ,I am basically new to Telerik. I am trying to use a layout form in my view. but it is not posting data to the database. I did debugged all of my controllers and models so they are working fine, something is wrong in the view itself and I can't figure out what. Please help!!!!!!!!
This is all of my view (Create):
@model WeighmoreSouth32Web.Models.Site
@using Kendo.Mvc.UI
@{
ViewData["Title"] = "Create";
}
<h1>Create a Site</h1>
<div class="demo-section">
<div id="validation-success"></div>
@(Html.Kendo().Form<WeighmoreSouth32Web.Models.Site>()
.Name("exampleForm")
.HtmlAttributes(new { action = ("Create"), method="POST"})
.Items(itemss =>
{
itemss.AddGroup().Layout("grid").Grid(g => g.Cols(3).Gutter(20)).Label("Personal Info").Items(items => {
items.Add()
.Field(f => f.Name)
.Label(l => l.Text("Name:"));
items.Add()
.Field(f => f.Code)
.Label(l => l.Text("Code:"));
items.Add()
.Field(f => f.ABN)
.Label(l => l.Text("ABN:"))
.Hint("Hint: enter numeric/space characters only.");
items.Add().ColSpan(3).Field(f => f.Description)
.Label(l => l.Text("Description:"))
.Editor(e => e.TextArea().Rows(2));
});
})
)
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}