Hi Friends,
I have some issue in my code.
This is search functionality code. When I enter some text in textbox and click search, the results are displaying correctly. But when I enter text in textbox and click enter without pressing search button , all results are displaying irrespective of text which I entered. Please let me know any issues with the code.
This is the sample code. Based on the below sample code when I enter text in textbox and enter, it is always firing "Letter_Click" event. not hidden search button click. I dont know why this issue is happenning. Is it because of update panel or I am not sure.Please can you help me out from this issue.
<!--Update Progress is now out of the update panel, otherwise we were getting some JScript errors--> <div class="updateProgress"> <asp:UpdateProgress ID="updateProgress" AssociatedUpdatePanelID="UpdatePanel1" DynamicLayout="false" DisplayAfter="0" runat="server"> <ProgressTemplate> <asp:Image ID="Image3" ImageUrl="~/Images/spinner_small.gif" runat="server" AlternateText="" GenerateEmptyAlternateText="true" /> </ProgressTemplate> </asp:UpdateProgress> </div> <asp:UpdatePanel ID="UpdatePanel1" runat="server" Visible="true" > <ContentTemplate>
<asp:Panel ID="paraPanel" Visible="false" runat="server" Style="cursor: move;background-color:white;border:solid 1px Gray;color:blue"> </asp:Panel> <div id="pcontent"> <div class="messagepanel"> <mes:Message ID="userMessage" runat="server"/> </div> <asp:UpdatePanel ID="upLetters" runat="server" UpdateMode = "Conditional" Visible="true" RenderMode="Inline"> <ContentTemplate> <ul class="searchbar"> <li class="firstitem"><asp:ImageButton id="btn_" runat="server" CommandArgument="_" OnClick="Letter_Click" ImageUrl="~/images/popup/hash.gif" AlternateText="Search #" Width="19" Height="18" TabIndex="-1" CausesValidation="false" /></li> <li><asp:ImageButton id="btnA" runat="server" CommandArgument="A" OnClick="Letter_Click" ImageUrl="~/images/popup/A.gif" AlternateText="Search A" Width="19" Height="18" TabIndex="-1" CausesValidation="false" /></li> </ContentTemplate> </asp:UpdatePanel>
</div> <!--pcontent-->
<div class="searchtxtbox" runat=server id="searchtxtbox"> <asp:label id="lblCriteriaCaption" AssociatedControlID="txtSearchCriteria" runat="server">Missing Title</asp:label> <asp:TextBox ID="txtSearchCriteria" runat="server" TabIndex="1"></asp:TextBox> </div> <div class="searchbtn"> <asp:ImageButton id="btnSearch" OnClick="btnSearch_Click" runat="server" ImageUrl="~/images/search_btn.gif" AlternateText="Search" CausesValidation="false"/> <asp:ImageButton id="btnHiddenSearch" OnClick="btnHiddenSearch_Click" runat="server" ImageUrl="~/images/search_btn.gif" AlternateText="Search hidden" CausesValidation="false" style="display:none"/> </div>
</ContentTemplate> </asp:UpdatePanel>
Thanks Bhavani