Click here to Skip to main content
12,951,462 members (48,350 online)
Rate this:
 
Please Sign up or sign in to vote.
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:
[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:
@model GoGrain.Models.Account
 
<h2>SigningIn</h2>
@Html.Partial("_PartialSigningIn")




and partialview is:

<pre lang="sql">@model GoGrain.Models.Account
 
@using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "signinginDialog" }))
{
    @Html.ValidationSummary(true)
    @Html.EditorForModel()
}



and jquery is:

<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 8-Jan-13 0:53am
Comments
Sandeep Mewara 8-Jan-13 8:50am
   
What error?

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,084
CHill60 3,480
Maciej Los 3,083
Jochen Arndt 1,975
ppolymorphe 1,830


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100