Here is a possible approach. Basically you wrap TextBox
and LinkButton
into the panel. Panel provides an option to specify a default button - that is a button that will be clicked when user hits Enter
in the textbox inside this panel.
<ItemTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="LinkButton1">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Cmd" Text="FireCmd"/>
</asp:Panel>
</ItemTemplate>
Beware that there might be a problem in FF with LinkButton
being default - here is a post describing both problem and solution. However it might be outdated - post was written in 2007, things might have changed since then.