If the buttons are server-side controls <asp:button/>, you can handle the event of the (specific) button:
protected void Button1_Click(object sender, EventArgs e) {....}
against.
protected void Button2_Click(object sender, EventArgs e) {......}
Page_Load: ASP.Net
HTML <input type=submit /> , Request.Form ( ).
UPDATE:
Page_Load ,- ,
Page.IsValid , -. - /
Page_Load ( Page.IsPostBack - ...
, ( ) Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
if ((UserEmail.Text == "jchen@contoso.com") &&
(UserPass.Text == "37Yj*99Ps"))
{
FormsAuthentication.RedirectFromLoginPage
(UserEmail.Text, Persist.Checked);
}
else
{
......
}
}
}
, MSDN
UPDATE2:
, Page_Load. Page.IsValid.