Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BillingModel
- {
- [Required,
- DisplayName("First Name")]
- public string FirstName { get; set; }
- [Required,
- DisplayName("Last Name")]
- public string LastName { get; set; }
- }
- public class CustomerModel
- {
- [Required,
- DisplayName("Address")]
- public string Adress { get; set; }
- [Required,
- DisplayName("City")]
- public string City { get; set; }
- }
- public class OrderViewModel
- {
- public BillingModel Billing { get; set; }
- public CustomerModel Customer { get; set; }
- }
- <input id="Business_FirstName" name="Business.FirstName" type="text" value="" />
- <input id="Business_LastName" name="Business.LastName" type="text" value="" />
- @Html.TextBoxFor(x => x.Business.FirstName)
- @Html.TextBoxFor(x => x.Business.LastName)
- <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
- <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
- @Html.TextBoxFor(x => x.Business.FirstName)
- @Html.ValidationMessageFor(x => x.Business.FirstName)
- @Html.TextBoxFor(x => x.Business.LastName)
- @Html.ValidationMessageFor(x => x.Business.LastName)
- <add key="ClientValidationEnabled" value="true" />
- <add key="UnobtrusiveJavaScriptEnabled" value="true" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement