| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
VB.Net Dynamic Recursive Menu
I got this idea from helping another member with some similar code. This uses the Menu Class to build a menu a populates it from a database, allowing for multiple child menus. Sample files are included.
Menu.aspx Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="menu.aspx.vb" Inherits="_Menu"%>
<html>
<head>
<title>Recursive Menu Example</title>
</head>
<body>
<form id="Form1" runat="server">
<asp:Panel ID="Panel1" runat="server" />
</form>
</body>
</html>
menu.aspx.vb VB.Net Code:
Table design: This setup uses a table with the following field types: itemid - AutoNumber parentid - Number linktext - Text linkurl - Text Parent items will have parentid = 0 whereas child items will have parentid = itemid of the parent.
__________________
jmurrayhead Did I help you out? Make me popular by clicking the icon!New Members:Proper way to post a question Powered by ASP.Net Last edited by mehere : February 8th, 2008 at 09:25 AM. |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > VB.Net Dynamic Recursive Menu |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|