Now you could easily specify default button/focus on control (ASP.NET 2.0)
In ASP.NET 1.X, if you wanted to make any button as a default or if you wanted to keep a specified text box control as a default focus after page load, it’s not that easy as we have to write JavaScript on page load to achieve this!! But in 2.0, it’s going to be vary simple!
Let’s say if you want to keep BtnSubmit as a default and have default focus on TextBox1 control, then all you have to do is, you have to add defaultbutton, defaultfocus attributes in server side form tag!! That’s it, you are done!!
<form id="Form1"
defaultbutton="BtnSubmit"
defaultfocus="TextBox1"
runat="server">
After page load the default focus will be in TextBox1 and BtnSumbit will act as a default button! Haa. how simple it is… life is soooo easy now with 2.0 J