Saturday, August 22, 2015

MVC Design

@using (Html.BeginForm(MVC.Cart.Cart.ActionNames.Checkout, MVC.Cart.Cart.Name, FormMethod.Post))
{
   
    <table>
        <tr>
            <td>Name : @Html.TextBoxFor(c=>c.Name)</td>
        </tr>
        <tr>
            <td>Email : @Html.TextBoxFor(c=>c.Email) </td>
        </tr>
       
        <tr>
            <td><button type="submit">Add to cart</button></td>
        </tr>
    </table>

}



@using (Html.BeginForm(MVC.Account.ActionNames.LogOff, MVC.Account.Name, new { area = "" }, FormMethod.Post, new { id = "logoutForm" }))
{
    @Html.AntiForgeryToken()
    <td><button type="submit">Ok</button></td>
    @*@Html.ActionLink("OK", MVC.Account.ActionNames.LogOff, MVC.Account.Name, new {area = ""}, null)*@
}

   @foreach (var product in Model.Products)
    {
        <tr>
            <td>@product.ProductName</td>
            <td>@product.Price</td>
            <td>@Html.ActionLink("View", MVC.Cart.Cart.ActionNames.ViewItem, MVC.Cart.Cart.Name, new { itemId = @product.Id },new {})</td>
        </tr>
    }

No comments:

Post a Comment