This is a migrated thread and some comments may be shown as answers.

Error rendering telerik:RadMenu

3 Answers 124 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 2
Keith asked on 29 May 2013, 04:39 AM

I have broken down the site I am developing into multiple files developed as user controls. It makes more sense to simply add a single usercontrol than to add half a dozen or more other controls to multiple pages, plus when I need to edit the item it gets applied site-wide. However, there seems to be an issue that I am not sure how to handle.

I have a user control "header.ascx" that is included on several webpages.

<%@ Register Src="menu.ascx" TagName="menu" TagPrefix="uc1" %>
<div id="header">

    <div id="orgname" class="headerinfo" style="position: relative; z-index: 1500; text-align: right">
        <asp:Label ID="lblOrganizationName" runat="server" Font-Names="Arial Black" ForeColor="Gray" Text="Organization Name"
            Font-Size="Large"></asp:Label>
    </div>
    <div id="logindetails" class="headerinfo" style="text-align: right; position: relative;
        z-index: 1500; top: 0px; left: 0px;">
        <asp:Label ID="lblUser" runat="server" Font-Names="Arial" ForeColor="Gray" Text="User Name"
            Font-Size="Small"></asp:Label
        <asp:LoginStatus ID="LoginStatus1" runat="server" Font-Names="Tahoma,Arial" ForeColor="#FF6600" />
           
        <asp:Label ID="lblPage" runat="server" Font-Names="Arial Black" ForeColor="Gray"
            Text="" Font-Size="Small"></asp:Label>   
        <uc1:menu ID="menu1" runat="server" />
    </div>
</div>

As you can see, I have also included a user control "menu.ascx" that is part of the header as well as part of other pages that don't include the full header.

When I view menu.ascx in the IDE, the menu is rendered correctly. If I view header.ascx in the IDE the menu is rendered correctly, however, whenever I view any page in the IDE that has a header user control, I get an error "Unknown server tag 'telerik:RadMenu'" and the menu isn't rendered.

When the menu isn't nested in another user control, it displays correctly. However, when it is included as part of a larger user control, it does not.

I can build the site and it renders correctly in the browser, however, I cannot see how it interacts with the design when it will not show on the main page.

Am I missing a directive or something so this will display?

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 03 Jun 2013, 06:51 AM
Hello,

Could you please tell us if the page still runs in the browser? Sometimes VS' assembly cache gets out of whack and it gives errors that aren't "real." If the page still functions correctly (despite the VS errors), the fix is probably a simple matter of clearing your ASP.NET Temporary Files and making sure the Telerik.Web.UI assembly is properly referenced in your web app.

If you get an error when you run the page, there may be a problem with your referenced assembly or your web.config. Make sure the correct Telerik.Web.UI.dll is in your developer's Bin directory and make any references to the Telerik.Web.UI assembly in the web.config are configured for the correct version.

 

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Keith
Top achievements
Rank 2
answered on 03 Jun 2013, 01:03 PM
Yes, as I stated before, the menu does render correctly when viewed in a browser. This isn't a huge problem, only an inconvenience having to view the page in a browser to see the menu applied.
0
Boyan Dimitrov
Telerik team
answered on 06 Jun 2013, 10:23 AM
Hello,

Indeed it is a inconvenience having an error in your design view of your Visual Studio. I would suggest reviewing the following blog post. It explains about an error also known as “Error Creating Control” and a couple of steps you can take to try to resolve this issue. 

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Menu
Asked by
Keith
Top achievements
Rank 2
Answers by
Boyan Dimitrov
Telerik team
Keith
Top achievements
Rank 2
Share this question
or