Images Demo

This demo, created by Steven Perry, illustrates using images in the menu items, as opposed to text. You can specify that an image should be displayed by setting the <image> element in the XML file. You can preview the XML file used in this example at nav.xml.


Realize that there is VS.NET designer support with skmMenu, so configuring the display is as simple as setting a few properties via the Properties pane...

Source Code
ASP.NET HTML Portion
<cc1:menu id="Menu1" runat="server"></cc1:menu>

Code-Behind Class
Public Class example3
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents Menu1 As skmMenu.Menu

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        If (Page.IsPostBack = False) Then
            Menu1.DataSource = Server.MapPath("nav.xml")
            Menu1.DataBind()
        End If
    End Sub

End Class