Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Menu Items do not exist on GoDaddy in Page_Load

$
0
0

I have nested RadMenuItems hard coded in an aspx file with 3 different but similar menus.  Under a certain condition I need to remove the second menu item in each menu which works fine in the Visual Studio 2013 test environment. When I deploy to GoDaddy, remove on the third menu does not work in Page_Load. 

GoDaddy the items in the third menu in the aspx file are not fully instantiated in Page_Load. 

I was forced to code to check if the hard coded menu items exist and abandon the remove to avoid run-time errors.

if (JoinButtonMenu.Items.Count > 2 && JoinButtonMenu.Items.Count > 2)  {     
     JoinButtonMenu.Items[1].Items[1].Remove();
}

<telerik:RadContextMenuID="JoinButtonMenu"CssClass="RadContextMenu3"runat="server">
    <ExpandAnimationType="None"Duration="0"/>
    <CollapseAnimationType="None"Duration="0"/>
    <Items>
        <telerik:RadMenuItemText="Edit"  NavigateUrl="javascript:MenuItemSelected('Edit');"PostBack="False"></telerik:RadMenuItem>
        <telerik:RadMenuItemText="Insert"PostBack="False">
            <Items>
                <telerik:RadMenuItemText="Insert Display Text..."  NavigateUrl="javascript:MenuItemSelected('AddText');"PostBack="False"></telerik:RadMenuItem>
                <telerik:RadMenuItemText="Insert Checkboxes..."  NavigateUrl="javascript:MenuItemSelected('AddChecks');"PostBack="False"></telerik:RadMenuItem>

....

The menu items missing in the Page_Load code all show up fine in the page including the one I need to get rid of.

Any ideas how to work around this problem and why it is happening?


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>