Converting Search LinkButton to ImageButton doesn't work
Posted: Tue Sep 15, 2009 4:29 pm
In CategorySearchSideBar.ascx, the keyword button is defined as follows:
Our design uses an image instead of a formatted link so I tried the following:
When I do this, the page posts back but nothing happens. This is because on postback, the Imagebutton produces an empty value for eventTarget in PageInit routine. So NarrowByKeyword never gets called. I also tried it with EnableViewState="True" but that made no difference either.
Can someone tell me what I'm doing wrong? Changing linkbuttons to imagebuttons elsewhere worked fine. It's just on this page that it seems to fail. Thanks in advance.
Code: Select all
<asp:LinkButton ID="KeywordButton" runat="server" Text="Go" CssClass="searchButton"
SkinId="ignore" EnableViewState="False" />
Code: Select all
<asp:ImageButton ID="KeywordButton" runat="server" Text="Go" CssClass="searchButton"
SkinId="ignore" EnableViewState="False"
ImageUrl="~/App_Themes/StorkGiftsBrown/images/pink-go-button.jpg"
/>
Can someone tell me what I'm doing wrong? Changing linkbuttons to imagebuttons elsewhere worked fine. It's just on this page that it seems to fail. Thanks in advance.