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

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	编辑商品
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>编辑商品</h2>

    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>商品信息</legend>
            <p>           
            <img width="150" height="150" border="0" src='/ProductImages/<%=Model.Image %>'/>
        </p>  
            
            <p>
                <label for="ProductId">ProductId:</label>
                <%= Html.TextBox("ProductId", Model.ProductId) %>
                <%= Html.ValidationMessage("ProductId", "*") %>
            </p>
            <p>
                <label for="BrandId">BrandId:</label>
                <%= Html.TextBox("BrandId", Model.BrandId) %>
                <%= Html.ValidationMessage("BrandId", "*") %>
            </p>
            <p>
                <label for="CategoryId">CategoryId:</label>
                <%= Html.TextBox("CategoryId", Model.CategoryId) %>
                <%= Html.ValidationMessage("CategoryId", "*") %>
            </p>
            <p>
                <label for="Name">Name:</label>
                <%= Html.TextBox("Name", Model.Name) %>
                <%= Html.ValidationMessage("Name", "*") %>
            </p>
            <p>
                <label for="Descn">Descn:</label>
                <%= Html.TextBox("Descn", Model.Descn) %>
                <%= Html.ValidationMessage("Descn", "*") %>
            </p>
            <p>
                <label for="Image">Image:</label>
                <%= Html.TextBox("Image", Model.Image) %>
                <%= Html.ValidationMessage("Image", "*") %>
            </p>        
             <p>
                <label for="ImageSmall">ImageSmall:</label>
                <%= Html.TextBox("ImageSmall", Model.ImageSmall) %>
                <%= Html.ValidationMessage("ImageSmall", "*") %>
            </p>
            <p>
                <label for="Price">Price:</label>
                <%= Html.TextBox("Price", String.Format("{0:F}", Model.Price)) %>
                <%= Html.ValidationMessage("Price", "*") %>
            </p>
            <p>
                <label for="VipPrice">VipPrice:</label>
                <%= Html.TextBox("VipPrice", String.Format("{0:F}", Model.VipPrice)) %>
                <%= Html.ValidationMessage("VipPrice", "*") %>
            </p>
            <p>
                <label for="Cheapness">Cheapness:</label>
                <%= Html.TextBox("Cheapness", Model.Cheapness) %>
                <%= Html.ValidationMessage("Cheapness", "*") %>
            </p>
            <p>
                <input type="submit" value="保存" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("返回列表", "List")%>
    </div>

</asp:Content>

