Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ahmed Ramadan 10 posts 100 karma points
    Aug 14, 2018 @ 07:04
    Ahmed Ramadan
    0

    Multiform Partial view submit

    I have an issue with submit a form in partial view. Other forms are submit at the same time.

    Controller:

    [HttpPost, ValidateInput(false)]
        public ActionResult RenderShppingCart(Order model)
        {
            if (ModelState.IsValid && model != null)
            {
                if (User.Identity.Name == null || User.Identity.Name == "")
                {
                    ModelState.AddModelError("", "Please login first!.");
                    return CurrentUmbracoPage();
                } 
    

      in partial view
    

    @using (Html.BeginUmbracoForm<ProductController>("RenderShppingCart", FormMethod.Post, new { id = "shippingform" }))
    

    { }

    other partial view

        @using (Html.BeginUmbracoForm<SiteAccountController>("RenderLogin", FormMethod.Post, new { id = "loginform" }))
        {
            @Html.AntiForgeryToken()
            @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    

    }

Please Sign in or register to post replies

Write your reply to:

Draft