More in this section
Forums / Set-up & Installation / Search Template

Search Template

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
6 posts, 0 answered
  1. Evans Quirion
    Evans Quirion avatar
    2 posts
    24 Apr 2006
    04 Apr 2008
    Link to this post
    Sorry for my poor english I usually speak french.

    I'm trying to modify the search control template with no success. I want to use an image button instead of standard button.

    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sfWeb" %> 
    <sfWeb:CssFileLink ID="CssFileLink1" FileName="~/Sitefinity/ControlTemplates/Search/searchCommonLayout.css"   
    Media="screen" runat="server" /> 
    <fieldset class="sf_searchBox">  
        <table cellpadding="0" cellspacing="0" border="0"   
            style="background-image: url('/images/homepage/bloc_recherche.jpg'); background-repeat:no-repeat">  
                <td style="padding-top: 22px; padding-left: 6px; width: 99px;">  
                    <asp:TextBox ID="queryText" runat="server" BorderStyle="None" BorderWidth="0px"   
                        EnableTheming="False" Font-Names="Arial"   
                        Font-Size="8pt" Width="99px"></asp:TextBox> 
    <input type="image" id="searchButton" runat="server" class="sf_searchSubmit" value="Search" alt="Search"   

    All works fine when I change type="image" for type="button" on searchButton. How Can I use a image button ?

  2. Rebecca
    Rebecca avatar
    536 posts
    24 Sep 2012
    04 Apr 2008
    Link to this post
    Hi Evans Quirion,

    The problem with the ImageButton is caused by the fact that it doesn't implement the IAttributeAccessor interface. It is a requirement for the type of the search button. 

    You can achieve your goal by adding styles to the existing button control.

    Please look at the attachment. It contains a modified version of the template ~/Sitefinity/ControlTemplates/Search/SearchBox.ascx and an image. To make it a working example, you need to put illustration.jpg in the Images folder and replace the name of the project in the URL (ProjectName) with the real name of your project.

    Do let us know if you need any further assistance and don't worry about your English :)

    Best wishes,

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Evans Quirion
    Evans Quirion avatar
    2 posts
    24 Apr 2006
    04 Apr 2008
    Link to this post
    OMG. Simply answer for a stupid question. I'm sorry to have waste your time with that. That's what happen when old vb developper recycle in web development.

    Thank you

  4. Iwert
    Iwert avatar
    1 posts
    03 Dec 2007
    13 Apr 2008
    Link to this post

    It works great. but later i found that you need to change the style a bit to comply with IE7. Add: background-color:Transparent

    <input type ="button" id="searchButton" runat="server" class="sf_searchSubmit" alt="Search" style="background-image: url(; width: 150px; border: none; background-color:Transparent" />

  5. Devin
    Devin avatar
    149 posts
    09 Jun 2009
    18 Jan 2010
    Link to this post
    Hi is there a way to use an <a> tag instead of an <input> tag?

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    19 Jan 2010
    Link to this post
    Hello Devin,

    You can use HtmlAnchor and HyperLink for the search button. Note that you must specify the id of the control

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered