Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AcceptButton on WebForm 1

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
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

Code:
private void Page_Load(object sender, System.EventArgs e)
{
	if (Page.IsPostBack && txtLastName.Text != "")
	{
		SearchContactByLastName(sender, e);
	}
}

Thanks!
 
There have been many posts regarding your question in this forum. Take some time to search. Ca8msm give 2 good answers here:

thread855-1160705

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top