More in this section

Forums / Bugs & Issues / SearchBox Exception in VS 2010 Designer - Sitefinity 4.4

SearchBox Exception in VS 2010 Designer - Sitefinity 4.4

1 posts, 0 answered
  1. Jacques
    Jacques avatar
    427 posts
    28 Jun 2007
    10 Apr 2012
    Link to this post
    Hi there, 

    We created a custom user control to construct a custom menu and want to add the Sitefinity SearchBox to it as follows: 
    <sfSearch:SearchBox ID="SitefinitySearch" runat="server" ResultsUrl="/search" SearchIndexPipeId="xxx-xxx-xxxx-xxxxx">
                <fieldset class="sfsearchBox">
                    <asp:TextBox ID="searchTextBox" runat="server" CssClass="sfsearchTxt" />
                    <asp:Button ID="searchButton" runat="server" Text="" OnClientClick="return false;" CssClass="sfsearchSubmit" />
    This code is inside a user control called SubNavigation.ascx and has the correct @ Register declaration as follows: 
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Services.Search.Web.UI.Public" TagPrefix="sfSearch" %>

    This actually works when we register the control in Sitefinity and put it into a page. It redirects to the right page, performs the search and so forth so everything is fine. 

    But we noticed that none of the controls in our User Control were accessible in C# due to the designer file not being updated. After troubleshooting we see now that when we remove the Sitefinity SearchBox control the designer file is correctly updated and controls become accessible from C#. Put the SearchBox back and the problems start again. 

    When you switch to design view the control itself throws the exception: "The type initializer for 'Telerik.Sitefinity.Localization.Res' threw an exception. 

    I've removed all the attributes of the control and the templated section and it still does the same thing. 

    Is this a bug? Is it fixable? 

1 posts, 0 answered