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

RadMenu with images reload and very slow

1 Answer 69 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Edgar
Top achievements
Rank 1
Edgar asked on 14 Mar 2012, 04:14 AM
I use RadMenu Control with Images (icons) from a table in the database and works fine. the problem is that every time I load a web page, the menu is reloaded and becomes very slow. 
Please can you help me resolve this issue. thanks 


Public Class Site1
    Inherits System.Web.UI.MasterPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then

            'enlazo el control de menú al DataTable
            Me.RadMenuPrincipal.DataSource = CargarMenu()
            Me.RadMenuPrincipal.DataFieldID = "ID_MODULO"
            Me.RadMenuPrincipal.DataFieldParentID = "ID_MODULO_PADRE"
            Me.RadMenuPrincipal.DataTextField = "NOMBRE_MODULO"
            Me.RadMenuPrincipal.DataValueField = "ID_MODULO"
            Me.RadMenuPrincipal.DataNavigateUrlField = "LINK_PAGINA"

            Me.RadMenuPrincipal.DataBind()

        End If
    End Sub


    Private Sub RadMenuPrincipal_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadMenuPrincipal.ItemDataBound
        'Set additional properties. ToolTip for example:  
        Dim row As DataRowView = CType(e.Item.DataItem, DataRowView)
        e.Item.ToolTip = row("Tooltip").ToString()
        e.Item.ImageUrl = row("LINK_IMAGEN").ToString()
    End Sub
End Class

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 16 Mar 2012, 02:03 PM
Hi Edgar,

I noticed that you send us a support ticket regarding the same question. Here I will also post my answer in case anyone else has the same issue:

One approach that I could suggest is that you use the control in a custom user control with OutputCache enabled as described in the following help article - Use RadMenu in a user control with OutputCache enabled. You can also refer to the following post where you can also find some useful tips for better performance when using our controls - How Telerik’s ASP.NET AJAX Controls Help You Build High-Performing Apps Faster

All the best,
Kate
the Telerik team
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.
Tags
Menu
Asked by
Edgar
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or