Click here to Skip to main content
15,942,934 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,


I am doing mvc3 razor application for this i want to display popup for signin page but i am getting errors ml controller is:
C#
[HttpGet]
public ActionResult SigningIn()
{
    if (Request.IsAjaxRequest())
    {
        return PartialView("_PartialSigningIn");
    }
    return View();
}
[HttpPost]
public ActionResult SigningIn(Account account3)
{
    if (!ModelState.IsValid)
    {
        if (Request.IsAjaxRequest())
            return PartialView("_PartialSigningIn",account3);
    }
    return View(account3);
}




and my view Is:
C#
@model GoGrain.Models.Account

<h2>SigningIn</h2>
@Html.Partial("_PartialSigningIn")




and partialview is:

C#
<pre lang="sql">@model GoGrain.Models.Account

@using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "signinginDialog" }))
{
    @Html.ValidationSummary(true)
    @Html.EditorForModel()
}



and jquery is:

XML
<script type="text/javascript">

    $.ajaxSetup({ cache: false });

    $(document).ready(function () {
        $(".openDialog").live("click", function (e) {
            e.preventDefault();

            $("<div></div>")
                .addClass("dialog")
                .attr("id", $(this)
                .attr("data-dialog-id"))
                .appendTo("body")
                .dialog({
                    title: $(this).attr("data-dialog-title"),
                    close: function () { $(this).remove() },
                    modal: true
                })
                .load(this.href);
        });

        $(".close").live("click", function (e) {
            e.preventDefault();
            $(this).closest(".dialog").dialog("close");
        });
    });
</script>
Posted
Comments
Sandeep Mewara 8-Jan-13 8:50am    
What error?

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900