R
Ron
I have created a 'LoginDialog ' user control with 'OK'
and 'Cancel' buttons. Then I have included the control
into a Web Form.
<form id="Login" method="post" runat="server" onclick="">
<div align="center">
<uc1:LoginDialog id="cntLoginDialog"
runat="server"></uc1:LoginDialog>
</div>
</form>
The control buttons have OnClick event handler but I
don't want the click event to initiate the round trip to
the server. I want the cancel handler to clear the user
name and password textboxes and the ok handler to
explicitely initiate the round trip
private void btOK_Click(object sender, System.EventArgs e)
{
if (Verifier.Verify(username, passowrd) == false)
{
// don't do the round trip
return;
}
Response.Redirect();
}
Only if the user name and the password are correct.
and 'Cancel' buttons. Then I have included the control
into a Web Form.
<form id="Login" method="post" runat="server" onclick="">
<div align="center">
<uc1:LoginDialog id="cntLoginDialog"
runat="server"></uc1:LoginDialog>
</div>
</form>
The control buttons have OnClick event handler but I
don't want the click event to initiate the round trip to
the server. I want the cancel handler to clear the user
name and password textboxes and the ok handler to
explicitely initiate the round trip
private void btOK_Click(object sender, System.EventArgs e)
{
if (Verifier.Verify(username, passowrd) == false)
{
// don't do the round trip
return;
}
Response.Redirect();
}
Only if the user name and the password are correct.