Search
Categories
  ASP.NET
Visual C#
Visual Basic
.NET Framework
ADO.NET
AJAX
LINQ
Java
 
How To Rating
 
5.0 out of 5


Total Votes: 3
         
1 2 3 4 5
 




How to set the Default Button in ASP.NET Web Form

Author: Waqas Anwar - Posted Date: 06-June-2009 - Category: ASP.NET   
Bookmark and Share
You have an ASP.NET Web Form with some button controls and you want to make one of those button default button of the form so that when use press Enter key in any control such as TextBox the default button click event fire automatically.

<form id="form1" runat="server" defaultbutton="FirstButton">

   <asp:TextBox ID="Textbox1" runat="server" />
   <asp:TextBox ID="Textbox2" runat="server" />

   <asp:Button ID="FirstButton" runat="server" Text="Default Button" />
   <asp:Button ID="SecondButton" runat="server" Text="Non Default Button" />

</form>

LEAVE YOUR COMMENTS LEAVE YOUR COMMENTS
 Name (required)  
 Email (required
 Website


 

 


 
 
 

Categories

My Portfolio

Website Links


Copyright @ 2009 EzzyLearning.com