views:

336

answers:

2

Basically I have a Search Text Box with a LinkButton Control on which the click event is fired. now what i want is when the user type keywords and press enter the Click event got fired.

So No Javascript Only ASP.NET With VB.NET v2.0

Sincerely Rajeev [email protected]

+1  A: 

Create a Panel that contains both the TextBox and LinkButton. The Panel has a property called DefaultButton, set DefaultButton equal to the ID of the LinkButton.

<asp:Panel id="panel" runat="server" DefaultButton="linkButton">
    <asp:TextBox id="search" runat="server"/>
    <asp:LinkButton id="linkButton" runat="server"/>
</asp:Panel>
s_hewitt
A: 

Can you not just use AutoPostback on the textbox?

ICodeWith.Net