DefaultButton and DefaultFocus in ASP.NET 2.0

ASP.NET 2.0 introduces DefaultButton and DefaultFocus properties. You can use the form tag to define the properties DefaultButton and DefaultFocus. Here is a small example.

 

 <form id="form1" defaultbutton="ButtonID" defaultfocus="TextBox1" runat="server">

The input controls in ASP.NET also exposes the DefaultFocus properties. The last control that call the Focus() method will be focused.  

powered by IMHO 1.3

Print | posted @ Tuesday, January 24, 2006 8:06 PM

Twitter