title: Where does returnUrl come from in the Login(string returnUrl)?
body: <p>I have a page that is requested like</p>
  
  <pre><code>/Bundler/Index?bid=153981866a37428a91ac870fa5cb169e
  </code></pre>
  
  <p>that I've decided to redirect to the</p>
  
  <pre><code>/Account/Login
  </code></pre>
  
  <p>page if the user is not signed in. Also, however, I'd like that once the user signs in they are redirected back to that page. </p>
  
  <p>I've tried to study the <code>Login</code> functions (I refuse to call functions "methods!" It reminds me of Java) from the ASP.NET MVC template and I  believe that the parameter <code>returnUrl</code> seen in the signatures </p>
  
  <pre><code>    //
      // GET: /Account/Login
      [AllowAnonymous]
      public ActionResult Login(string returnUrl)
      {
          ViewBag.ReturnUrl = returnUrl;
          return View();
      }
  
      //
      // POST: /Account/Login
      [HttpPost]
      [AllowAnonymous]
      [ValidateAntiForgeryToken]
      public async Task&lt;ActionResult&gt; Login(LoginViewModel model, string returnUrl)
      {
          if (!ModelState.IsValid)
          {
              return View(model);
          }
  
          // This doesn't count login failures towards account lockout
          // To enable password failures to trigger account lockout, change to shouldLockout: true
          var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
          switch (result)
          {
              case SignInStatus.Success:
                  return RedirectToLocal(returnUrl);
              case SignInStatus.LockedOut:
                  return View("Lockout");
              case SignInStatus.RequiresVerification:
                  return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe });
              case SignInStatus.Failure:
              default:
                  ModelState.AddModelError("", "Invalid login attempt.");
                  return View(model);
          }
      }
  </code></pre>
  
  <p>is the URL that the user will be directed to if they successfully log in. However, I'm not sure how to pass in a value for <code>returnUrl</code>.</p>
  
  <p>On the <code>/Account/Login</code> page</p>
  
  <p>the form </p>
  
  <pre><code>&lt;form action="/Account/Login" class="form-horizontal" method="post" role="form"&gt;
  </code></pre>
  
  <p>does not look like it contains any inputs that correspond to the parameter <code>returnUrl</code> because there are none with that name. </p>
  
  <p>So, how do I call, for instance, </p>
  
  <pre><code>Login("/Bundler/Index?bid=153981866a37428a91ac870fa5cb169e")
  </code></pre>
  
  <p>?? </p>