@model ParcelWeb.Core.Domain.City @{ ViewBag.Title = "Create"; }

Add City

@using (Html.BeginForm("Create", "Cities", FormMethod.Post, new { @class = "form form-horizontal" })) { @Html.AntiForgeryToken()

City Detail

@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.CountryId, "Country", htmlAttributes: new { @class = "label-control col-md-2" })
@Html.DropDownList("CountryId", null, htmlAttributes: new { @class = "form-control select2" }) @Html.ValidationMessageFor(model => model.CountryId, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.StateId, "State", htmlAttributes: new { @class = "label-control col-md-2" })
@Html.DropDownListFor(model => model.StateId, Enumerable.Empty(), "--Select State--", new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.StateId, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "label-control col-md-2" })
@Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.CityCode, htmlAttributes: new { @class = "label-control col-md-2" })
@Html.EditorFor(model => model.CityCode, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model => model.CityCode, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.Active, htmlAttributes: new { @class = "label-control col-md-2" })
@Html.EditorFor(model => model.Active) @Html.ValidationMessageFor(model => model.Active, "", new { @class = "text-danger" })
Cancel
}
@Html.ActionLink("Back to List", "Index")
@section Scripts { }