I have a requirement to open a popup from an action method in controller. The action method is basically registering a user.
[HttpPost]
public ActionResult Register(RegisterModel model)
{
if (ModelState.IsValid)
{
MembershipCreateStatus createStatus;
Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus);
if (createStatus == MembershipCreateStatus.Success)
{
FormsAuthentication.SetAuthCookie(model.UserName, false /* createPersistentCookie */);
//------------------------------------------
//I need to call a jquery function from here
//------------------------------------------
return RedirectToAction("Index", "Home");
}
else
{
ModelState.AddModelError("", ErrorCodeToString(createStatus));
}
}
return View(model);
}
The jquery function, present in the view, would just make a hidden DIV, visible, and set the opacity, etc, to represent a popup.
I need to call such a jquery function from the controller's action method shown above.