我有两个按钮,这两个在asp.net提交表单。
我需要在below..What按钮的功能知道的是clicked..The登录或注册按钮。 并通过这些信息,我想触发的负载情况下的功能之一。
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);
}
}
}
如果我有这样的按钮事件是什么:
FormsAuthentication.RedirectFromLoginPage(currentUser.UserName,FALSE);
将重定向按钮事件之后立即发生的呢? 还是会再次触发页面加载事件,忽略重定向?