Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
166 views

Hi all,

I encountered a really strange problem. After updating the project to use the latest version of the ASP.NET AJAX controls an error saying "Cannot use a leading .. to exit above the top directory" when a toolbar button is pressed or when an edit form is closing. After some investigation I found out that the issue is being caused by the RadMenu, as when I removed all the buttons, using the Chrome inspector, and clicked the toolbar icon, the application worked as expected.

Otherwise the menu itself is fully functional.

This is the stack trace of the exception if it is going to help:

[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] System.Web.Util.UrlPath.ReduceVirtualPath(String path) +12081723 System.Web.Util.UrlPath.Reduce(String path) +60 System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +259 Telerik.Web.UI.RadButton.DescribeClientProperties(IScriptDescriptor descriptor) +2227 Telerik.Web.UI.RadWebControl.DescribeComponent(IScriptDescriptor descriptor) +233 Telerik.Web.UI.RadButton.DescribeComponent(IScriptDescriptor descriptor) +27 Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control) +171 Telerik.Web.UI.RadWebControl.GetScriptDescriptors() +9 System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +166 Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +159 Telerik.Web.UI.RadWebControl.Render(HtmlTextWriter writer) +122 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderTemplateContent(HtmlTextWriter writer, Action`1 action) +288 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderContents(HtmlTextWriter writer) +171 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.Menu.Renderers.MenuItemRendererBase.RenderChildGroup(HtmlTextWriter writer, IList`1 items, String groupCssClass, Action action) +203 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderColumns(HtmlTextWriter writer, IList`1 itemsToRender, String groupCssClass) +587 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderContentWrapper(HtmlTextWriter writer, Action`1 action) +77 Telerik.Web.UI.Menu.Renderers.MenuItemRendererBase.RenderContents(HtmlTextWriter writer) +133 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.Menu.Renderers.MenuRendererBase.RenderRootGroup(HtmlTextWriter writer, Action`1 action) +263 Telerik.Web.UI.Menu.Renderers.MenuRenderer.RenderContents(HtmlTextWriter writer) +703 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +50 Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +94 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +131 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +959 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +114 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8817

Attila Antal
Telerik team
 answered on 27 Feb 2024
0 answers
30 views

When initializing a RadScheduler control on a mobile browser (examples are iOS Safari and Android Edge), the javascript plugins code crashes when trying to call `add_hiding` (assuming an event handler).

On the mobile browser, the issue isn't present when to toggle `View Desktop Site`.

From the error stack trace, the second line for `Plugin.js` points to:

Which looks like there's some handling to make context menus work on mobile device.

Any clues as to why `add_hiding` fails on mobile view?

Chris
Top achievements
Rank 1
 asked on 06 Nov 2023
1 answer
32 views

I am attempting to put a radmenu inside of a radgrid gridTemplateColumn. The radmenu appears to have a vertical separator at the end that I have been unable to identify and remove which is underlined in red in the image below. 

Markup is as follows. CSS below.

<!--grid markup removed other than relevant column -->
<telerik:GridTemplateColumn UniqueName="ParentGridMenu" HeaderStyle-Width="24px">
    <ItemTemplate>
        <telerik:RadMenu ID="menuParentRow" runat="server" Width="24px" ClickToOpen="true">
            <Items>
                <telerik:RadMenuItem ImageUrl="~/images/vertical-ellipsis-24.png" runat="server" Height="24px" Width="24px">
                    <Items>
                        <!--items removed as not relevant -->
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
    </ItemTemplate>
</telerik:GridTemplateColumn>

CSS lives in the page with the grid/menu markup.
    .rmRootGroup
   {
       border:none !important;
       background-color:transparent !important;
       background-image:none !important;
   },
.RadMenu_Default .rmVertical a.rmLink:hover,
.RadMenu_Default .rmVertical a.rmFocused,
.RadMenu_Default .rmVertical a.rmSelected,
.RadMenu_Default .rmVertical a.rmExpanded,
.RadMenu_Default .rmVertical a.rmExpanded:hover {
   border:0 !important;
   padding-bottom:1px !important;
   padding-top:1px !important;
   background-color:transparent !important;
   background-image:none !important;
}

Vessy
Telerik team
 answered on 20 Oct 2023
0 answers
107 views

Hi,

I am updating a JQuery version  3.7.0 on our website. I have gotten many errors.

 

Priyam
Top achievements
Rank 1
 asked on 22 Sep 2023
0 answers
91 views

 

Using RadMenu's, submenu is getting expanded on click but if I click on other submenu previous one is not getting collapsed and it remain open only.

 I tried below javascript, got it from Telerik forums. It is working for level 1 menu items not for submenu items (level 2 menu items) and sub-submenu items(level 3 items) also.

I have to click twice on level 2 items to open level 3 items.

 

Code:

    <script type="text/javascript">

        function onClientItemClicked(sender, args) {
            sender.close(true);
        }
        function OnClientMouseOverHandler(sender, eventArgs) {
            if (eventArgs.get_item().get_parent() == sender) {
                sender.set_clicked(false);
            }
        }
     </script>

 

<telerik:RadMenu ID="SampleMenu" runat="server" Skin="Product" RenderMode="Lightweight"  ShowToggleHandle="true"   AppendDataBoundItems="true" EnableEmbeddedSkins="false" EnableRoundedCorners="true" EnableShadows="true" ExpandDelay="300" ExpandAnimation-Type="InSine"  Flow="Vertical" OnClientItemClicked="OnClientItemClicked"     OnClientMouseOver="OnClientMouseOverHandler">
                                 
</telerik:RadMenu>

 

Snehal
Top achievements
Rank 1
 asked on 20 Jan 2023
1 answer
68 views

While trying to upgrade noted versions of Telerik dlls from 2014 to 2016, I am getting the following compile error

Error 31 The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?

 

I followed the steps to upgrade outlined in the "Upgrade your Telerik ASP.NET Controls in 6 Easy Steps" article https://www.telerik.com/blogs/upgrade-the-version-of-your-telerik-asp.net-controls-in-6-easy-steps?_ga=2.80374999.1963511989.1669135347-1568160397.1669135347&_gl=1*1b5a3vu*_ga*MTU2ODE2MDM5Ny4xNjY5MTM1MzQ3*_ga_9JSNBCSF54*MTY2OTEzNzUyMC4yLjEuMTY2OTEzNzcyNi4wLjAuMA..

Still getting the errors.

Resetting the references back to the 2014 version fixes the errors.

Please help me to resolve

Valentin Dragnev
Telerik team
 answered on 23 Nov 2022
3 answers
75 views

Hello everyone!

I've got the below RadSiteMap being coded from codebehind (VB). I want to add small icons to the left of each submenu's text however I do not know how. The ImageUrl property apparently does not exist for the RadSiteMap and I cannot think of another way to insert my icons.

Check the attached screenshot to see how my menu looks like and where would I want to add icons. I basically want to add them into the titles and then a different icon to each submenu as well.

Note: My RadMenu is being populated entirely from a database (all of it, parent and childs). If you wish to see the code for a better understanding, I can also leave that in the comments.

Thanks a lot!


Private Function CreateSiteMap(ByVal container As Control, ByVal Id As String) As RadSiteMap
        Try
            System.Diagnostics.Debug.WriteLine("id: " &Id)

            Dim acd As New SiteWeb.AccesDonnees

            'On créer le controle de type RadSiteMap
            Dim SiteMap1 As New RadSiteMap

            'On le configure comme souhaité
            SiteMap1.ID = "SiteMapMenu"
            SiteMap1.DataTextField = "Libelle"
            SiteMap1.DataFieldID = "Identifiant"
            SiteMap1.DataFieldParentID = "Parent"
            SiteMap1.DataValueField = "Libelle"
            SiteMap1.DataNavigateUrlField = "Lienpage"
  
            'This sql receives all the submenus under the current Parent menu
            SiteMap1.DataSource =
            acd.RetournerDataReader("SELECT RTRIM(Identifiant) as Identifiant,RTrim(Libelle) As Libelle,RTrim(Parent) as Parent,RTRIM(Lienpage) as Lienpage,RTRIM(ParentGlobal) As ParentGlobal FROM lobdjetBDD WHERE  NomUser = '" & hf_fonction.Value & "' AND (Parent = '" & Id & "' OR ParentGlobal = '" & Id & "' OR Identifiant = '" & Id & "') Order By Libelle, ChapitreParentGlobal, ChapitreParent,ChapitreEnfant", "EU_BREST")

            SiteMap1.DataBind()

            [.....] I removed this part of the code to make my post smaller on the forums.
 
 container.Controls.Add(SiteMap1)

            Return SiteMap1

        Catch ex As Exception
            Return Nothing
 Exit Function
 End Try
 End Function

 

Valentin Dragnev
Telerik team
 answered on 07 Oct 2022
1 answer
59 views

Hello!

I am trying to find a way to set RadMenu items' imageUrl via Javascript. Is that possible? By ImageUrl, I mean the image on the left of the menu (icons).

 

Thanks!

Johnny
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 05 Oct 2022
4 answers
155 views

Hello everyone,

I've been trying to find a way to add my company's logo to the RadMenu, on the left side, just like we see on almost every website. You check the attached image to have a better idea about what do I exactly mean.

Thank you!

Valentin Dragnev
Telerik team
 answered on 10 Aug 2022
2 answers
56 views

Is it possible to remove the the togglehandle text "Toggle" because it is indexed by GoogleBot, as in attached screenshot.

 

Thanks, Marc

Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 05 Aug 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?