ASP.Net doesn't like multiple forms on a webform; indeed, it is the paradigm now that one webform has one "form" on it (hence the name - webform). However, as people begin buliding tricky input forms on their pages it becomes necessary to specify "default" buttons throughout the page. As an example, say you're filling out one of two forms on a page and you want to hit the Enter key to submit your form data. If there are multiple forms on the page, then you will run into a problem as the browser attempts (and possibly fails) to ascertain which button should recieve the keydown event.
In ASP.Net the Panel control supports a default button so that you can "subsection" out your form with various different buttons being the default. If focus happens to be on a control within a panel that has one of these secondary submit buttons specified, then THAT button will get respond to your Enter keystroke.
Here's an example:
First, create a webform with two panels on it like this:

When you run the above form, regardless of whether your cursor is in the textbox of the first form or the second form, hitting ENTER will always act as if you clicked the button in the first.
To submit the button in the second via the ENTER key if your cursor is active in that textbox (or any control in that panel), do the following to the panels:
First form:
<asp:Panel ID="Panel1"
DefaultButton="Button1" runat="server" Height="127px" Width="151px">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click1" Text="Button" /></asp:Panel>
<br />
Second form<br />
<asp:Panel ID="Panel2"
DefaultButton="Button2" runat="server" Height="127px" Width="151px">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Button" /></asp:Panel>
</div>
Notice how I specify the "DefaultButton" property in the panel. Now if your cursor is active in any control within Panel2, Button2 will be the default submit button for your ENTER keystroke.
Addendum:
Please see
here for the documentation to this attribute. It is available in the .Net frameworks 2.0 and 3.0 only.
Recommended reading:


