tags:

views:

317

answers:

1

For a panel with one textbox and one button which is its default button, the DefaultButton event fires only once as editing textbox details again and pressing enter, event doesn't fire.

<asp:Panel runat="server" ID="pnlNewFolderDetails" DefaultButton="btnAddFolder">
     <asp:Label runat="server" ID="lblFolderHeader" Text="New Folder Name" CssClass="label" />
     <asp:TextBox runat="server" ID="txtFolderName" ToolTip="Folder Name" />
<asp:Button runat="server" ID="btnAddFolder" OnClick="btnAddFolder_Click" Text="Add" />

Any suggestions?

A: 

For a panel with one textbox and one button which is its default button, the DefaultButton event fires only once as editing textbox details again and pressing enter, event doesn't fire.

What do you mean "the DefaultButton event"? There isn't an event as such, .NET inserts some HTML that will associate the TextBox with the Button when Enter is pressed, it is not related to the click's of a button.

Dominic Zukiewicz