1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Telerik.Sitefinity.Web.UI gone in 4.1

Telerik.Sitefinity.Web.UI gone in 4.1

4 posts, 0 answered
  1. thelyrist
    thelyrist avatar
    16 posts
    Registered:
    18 May 2007
    19 Apr 2011
    Link to this post
    My master page has a Telerik.Sitefinity.Web.UI.SearchBox control and it no longer works.

    What's the alternative now?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    19 Apr 2011
    Link to this post
    Hello thelyrist,

    Can you provide some more description about this issue "Telerik.Sitefinity.Web.UI.SearchBox control and it no longer works"

    Best wishes,
    Ivan Dimitrov
    the Telerik team

  3. thelyrist
    thelyrist avatar
    16 posts
    Registered:
    18 May 2007
    21 Jul 2011
    Link to this post
    I built my template to include a custom Search Box as the client didn't like the default look and feel.  I found the code in the forum but I can't seem to locate it anymore.

    I have the following defined in my template.
    <sitefinity:SearchBox id="searchBox" runat="server" UseSearchButton="true" ClientIDMode="Predictable" LayoutTemplatePath="~/App_Data/Sitefinity/WebsiteTemplates/clientSite/WidgetTemplates/SearchBox/search-box.ascx"></sitefinity:SearchBox>

    It was working just fine in 4.0 but it stopped working since I upgraded to 4.1. 

    Error 3 The type or namespace name 'SearchBox' does not exist in the namespace 'Telerik.Sitefinity.Web.UI' (are you missing an assembly reference?) C:\wwwroot\clientSite\www\App_Data\Sitefinity\WebsiteTemplates\ClientSite\App_Master\ClientSite.Master.designer.cs 67 53 SitefinityWebApp

    The code of the ACSX:
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="search-box.ascx.cs" Inherits="SitefinityWebApp.search_box" %>
    <%@ Register TagPrefix="sitefinity" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" %>
    <script>
      function goSearch() {
        var searchBox = document.getElementById("searchBox_ctl00_ctl00_searchBox");
        if (searchBox != null) {
          if (searchBox.value == '') {
            alert('Please enter your search term.');
          }
          else {
            window.location = '/search?indexCatalogue=site%2Dsearch&&wordsMode=0&searchQuery=' + searchBox.value;
          }
        }
      }
    </script>
    <div id="applesearch">
      <div class="floatLeft">
        <span class="sbox_l"></span>
        <span class="sbox"><asp:TextBox ID="searchBox" runat="server" CssClass="sfsearchTxt" /></span>
        <span class="sbox_r" id="srch_clear"></span>
     </div>
     <div class="floatRight">
      <asp:ImageButton ImageUrl="~/images/search-button.png" runat="server" OnClientClick="goSearch();return false;" />
      <asp:LinkButton id="searchButton" runat="server" Text="Search" OnClientClick="return false;" CssClass="sfsearchSubmit" Enabled="false" Visible="false"></asp:LinkButton>
     </div>
     <div style="clear"> </div>
    </div>

    I had to do the hack above because the client wanted an image as the search button, and the searchbox templete uses a linkbutton.

     There are quite a few bugs that 4.1 sp2 might have fixed, but it am stuck with 4.0 as I can't get the code to compile in 4.1 as Telerik.Sitefinity.Web.UI no longer has the class "SearchBox".  Is it renamed or removed?

    Due to a past deadline and some other bugs in the original 4.1 release, I decided not to upgrade.  Please kindly offer any suggestions / workaround as needed.  Thanks!



  4. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    26 Jul 2011
    Link to this post
    Hi Thelyrist,

    Can you please try using the following namespace: Telerik.Sitefinity.Services.Search.Web.UI.Public and let us know if any problems persist?

    Best wishes,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered