title: Form submit in asp.net
body: <p>I have got two buttons, which both submit a form in asp.net. </p>
  
  <p>I need to know in the function below..What button was clicked..The login or register button. And by that information, I want to trigger the one of the functions in the load event.</p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
  {
      AddCountries();
      AddAge();
  
        if (IsPostBack)
        {
            string pwd = LoginPassword.Text;
            string saltAsBase64 = "z3llWdYSA2DY3M4uNSpOQw==";
            string hash = HashPass.GenerateHash(pwd, saltAsBase64);
  
            if (Page.IsValid)
            {
                LoginUser(hash);
           /// Depending on what the user pressed..I need to trigger the function 
          // above or below
                RegisterUser(hash);
            }
  
  
  
        }
  }
  </code></pre>
  
  <p>What if I have this in the button event:</p>
  
  <p>FormsAuthentication.RedirectFromLoginPage(currentUser.UserName, false);</p>
  
  <p>will the redirection happen immediately after the button event? or will it trigger the page load event again, ignoring that redirection?</p>