http://localhost:49431/WebSite/MasterPage.master.vb后台建立菜单


Partial Class MasterPage
    Inherits System.Web.UI.MasterPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim Menu1 As Menu = New Menu()
        Dim MenuItem0 As MenuItem = New MenuItem("主页", "", "", "~/Index.aspx", "")
        Dim MenuItema As MenuItem = New MenuItem("用户", "", "", "~/User.aspx", "")
        Dim MenuItemb As MenuItem = New MenuItem("商品", "", "", "~/Goods.aspx", "")
        Dim MenuItemc As MenuItem = New MenuItem("订单", "", "", "~/Jiaohuo.aspx", "")
        Dim MenuItemd As MenuItem = New MenuItem("d", "", "", "~/Goods.aspx", "")
        Dim MenuIteme As MenuItem = New MenuItem("e", "", "", "~/Goods.aspx", "")
        Dim MenuItemf As MenuItem = New MenuItem("f", "", "", "~/Goods.aspx", "")
        Dim MenuItemg As MenuItem = New MenuItem("g", "", "", "~/Goods.aspx", "")
        Dim MenuItemh As MenuItem = New MenuItem("h", "", "", "~/User.aspx", "")
        Dim MenuItemi As MenuItem = New MenuItem("i", "", "", "~/Goods.aspx", "")
        Dim MenuItemj As MenuItem = New MenuItem("j", "", "", "~/Jiaohuo.aspx", "")
        Dim MenuItemk As MenuItem = New MenuItem("k", "", "", "~/Goods.aspx", "")
        Dim MenuIteml As MenuItem = New MenuItem("l", "", "", "~/Goods.aspx", "")
        Dim MenuItemm As MenuItem = New MenuItem("m", "", "", "~/Goods.aspx", "")
        Dim MenuItemn As MenuItem = New MenuItem("n", "", "", "~/Goods.aspx", "")
        Dim MenuItemo As MenuItem = New MenuItem("o", "", "", "~/Goods.aspx", "")
        Dim MenuItemp As MenuItem = New MenuItem("p", "", "", "~/Goods.aspx", "")
        Dim MenuItemq As MenuItem = New MenuItem("q", "", "", "~/Goods.aspx", "")
        Dim MenuItemr As MenuItem = New MenuItem("r", "", "", "~/Goods.aspx", "")
        Dim MenuItems As MenuItem = New MenuItem("s", "", "", "~/User.aspx", "")
        Dim MenuItemt As MenuItem = New MenuItem("t", "", "", "~/Goods.aspx", "")
        Dim MenuItemu As MenuItem = New MenuItem("u", "", "", "~/Jiaohuo.aspx", "")
        Dim MenuItemv As MenuItem = New MenuItem("v", "", "", "~/Goods.aspx", "")
        Dim MenuItemw As MenuItem = New MenuItem("w", "", "", "~/Goods.aspx", "")
        Dim MenuItemx As MenuItem = New MenuItem("x", "", "", "~/Goods.aspx", "")
        Dim MenuItemy As MenuItem = New MenuItem("y", "", "", "~/Goods.aspx", "")
        Dim MenuItemz As MenuItem = New MenuItem("z", "", "", "~/Goods.aspx", "")
        Menu1.Orientation = Orientation.Horizontal
        Menu1.Items.Add(MenuItem0)
        Menu1.Items.Add(MenuItema)
        Menu1.Items.Add(MenuItemb)
        Menu1.Items.Add(MenuItemc)
        Menu1.Items.Add(MenuItemd)
        Menu1.Items.Add(MenuIteme)
        Menu1.Items.Add(MenuItemf)
        Menu1.Items.Add(MenuItemg)
        Menu1.Items.Add(MenuItemh)
        Menu1.Items.Add(MenuItemi)
        Menu1.Items.Add(MenuItemj)
        Menu1.Items.Add(MenuItemk)
        Menu1.Items.Add(MenuIteml)
        Menu1.Items.Add(MenuItemm)
        Menu1.Items.Add(MenuItemn)
        Menu1.Items.Add(MenuItemo)
        Menu1.Items.Add(MenuItemp)
        Menu1.Items.Add(MenuItemq)
        Menu1.Items.Add(MenuItemr)
        Menu1.Items.Add(MenuItems)
        Menu1.Items.Add(MenuItemt)
        Menu1.Items.Add(MenuItemu)
        Menu1.Items.Add(MenuItemv)
        Menu1.Items.Add(MenuItemw)
        Menu1.Items.Add(MenuItemx)
        Menu1.Items.Add(MenuItemy)
        Menu1.Items.Add(MenuItemz)
        Me.form1.Controls.Add(Menu1)
    End Sub
End Class

你可能感兴趣的:(http://localhost:49431/WebSite/MasterPage.master.vb后台建立菜单)