title: How to call a jquery function from an action method in controller?
body: <p>I have a requirement to open a popup from an action method in controller. The action method is basically registering a user. </p>
  
  <pre><code>[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);
  }
  </code></pre>
  
  <p>The jquery function, present in the view, would just make a hidden DIV, visible, and set the opacity, etc, to represent a popup.</p>
  
  <p>I need to call such a jquery function from the controller's action method shown above. </p>