Hi,
I have a search user control added to different pages. The button on the control works for all pages except for one, which has the same master page with other pages and the same properties for the page object as the working pages.
I have used web developer helper to see the differences between the rendered html for the control for working and not working pages.
The only difference seems to be that the onclick event of the ImageButton has this entry:
javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$searcher$search_btn", "", true, "", "", false, false))
There is no entry at all for the onclick event for pages with working controls.I would be glad if someone can help.
I know that this method is used by asp.net to cause post backs but I do not know how it is associated with the input tag in this case.
Also, in the pages that the control is working, could someone enlighten me about how this event handler is called despite being associated with the event at the markup.
Control code:
Front End
------------------------------
<input class="text" runat="server" id="search_txt" value="Search here..t." /> <asp:ImageButton runat="server" ID="search_btn" CssClass="searchbtn" ImageUrl="/public/img/round_button.png"
AlternateText="search" Width="22px" Height="22px">
Back End
------------------------------
Protected Sub search_btn_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles search_btn.Click
Thanks.