<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OrderDto>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.EnableClientValidation(); %>

    <!-- validation not working, because validation.js is not loaded -->

    <% using (Html.BeginForm()) { %>
    <p>
    <%= Html.LabelFor(x => x.ContactName)%>
    <%= Html.TextBoxFor(x => x.ContactName) %>
    <%= Html.ValidationMessageFor(x => x.ContactName)%>
    </p>
    <p>
    <%= Html.LabelFor(x => x.OrderDate)%>
    <%= Html.Telerik().DatePicker().Name("OrderDate").Value(Model.OrderDate)%>
    <%= Html.ValidationMessageFor(x => x.OrderDate)%>
    </p>
    <p>
    <%= Html.LabelFor(x => x.ShipAddress)%>
    <%= Html.TextAreaFor(x => x.ShipAddress) %>
    <%= Html.ValidationMessageFor(x => x.ShipAddress)%>
    </p>
    <button class="t-button t-state-default" type="submit">Save</button>

    <% } %>
</asp:Content>
