ralphtrent
Programmer
Hi
does anyone know if there is an AcceptButton that can be set on a page like it works in WinForms? Meaning, if I have a form and I hit the Enter Key, I want this buttons events to be fired.
This is my current Work Around, it works, but I want to know if there is a better way
Thanks!
does anyone know if there is an AcceptButton that can be set on a page like it works in WinForms? Meaning, if I have a form and I hit the Enter Key, I want this buttons events to be fired.
This is my current Work Around, it works, but I want to know if there is a better way
Code:
private void Page_Load(object sender, System.EventArgs e)
{
if (Page.IsPostBack && txtLastName.Text != "")
{
SearchContactByLastName(sender, e);
}
}
Thanks!