Hi,
I have a search field (a RadTextBox) and a standard .Net button in the top right of my website. This used to be a standard .Net text box and I eventually got it behaving so that if a user had entered some text and hit return then the search would be submitted. More importantly, if someone was on another form within the page (such as registration) and hit return on that form then it wouldn't fire of search. It seemed to take a lot to get this to behave correctly.
However, not that I have swapped the standard .Net text box for a RadTextBox the search is always being fired even when focus is in another form (and another ValidationGroup).
Is there something I can do to disable search from firing off all the time if the cursor is not in the form? Incidentally I use txtDummy as that was a fix for the standard .Net text input to behave(!).
Many thanks
I have a search field (a RadTextBox) and a standard .Net button in the top right of my website. This used to be a standard .Net text box and I eventually got it behaving so that if a user had entered some text and hit return then the search would be submitted. More importantly, if someone was on another form within the page (such as registration) and hit return on that form then it wouldn't fire of search. It seemed to take a lot to get this to behave correctly.
However, not that I have swapped the standard .Net text box for a RadTextBox the search is always being fired even when focus is in another form (and another ValidationGroup).
Is there something I can do to disable search from firing off all the time if the cursor is not in the form? Incidentally I use txtDummy as that was a fix for the standard .Net text input to behave(!).
Many thanks
<asp:Panel runat="server" ID="pnlSearch" DefaultButton="cmdGo"> |
<table class="searchControlTable"> |
<tr> |
<td> |
<telerik:RadTextBox Width="140px" ID="txtSearch" ValidationGroup="Search" runat="server" |
TextMode="SingleLine" EmptyMessage="Artist, Venue, Town or User" AutoCompleteType="Search" > |
</telerik:RadTextBox> |
</td> |
<td> |
<asp:TextBox ID="txtDummy" runat="server" Style="visibility: hidden; display: none;" /> |
<asp:ImageButton ID="cmdGo" ImageUrl="~/App_Themes/SmartTickets/images/search_16px.gif" runat="server" Text="Go" TabIndex="0" ValidationGroup="Search" |
UseSubmitBehavior="false" OnClick="cmdGo_Click" AlternateText="Search" ToolTip="Search" /> |
</td> |
</tr> |
</table> |
</asp:Panel> |