forum

Home / DeveloperSection / Forums / JQuery Dialog box not closed in ASP.NET MVC 4

JQuery Dialog box not closed in ASP.NET MVC 4

Takeshi Okada430230-Jan-2013

Hi Everyone!

I am using a dialog box with jQuery in MVC 4, my code as below

    <div id="dialogBox" title="Select Products" style="overflow: hidden;">
    </div>


    $('#dialogBox').load("@Url.Action("SelectProducts")",
                    function(response, status, xhr) {
                        $('#dialogBox').dialog('open');
    });

When I clicks on submit button in the dialog box I got to httppost as such


     [HttpPost]
     public ActionResult SelectProducts(Products model)
     {
        if (ModelState.IsValid)
        {
            lbService.ProductsData(model);
            return View(model); // success
        }

        return View(model); // problem          

     }

 

Thanks in advance


Updated on 30-Jan-2013

Can you answer this question?


Answer

1 Answers

Liked By