| | |
Using the Datalist Control as a Menu
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
Hey guys,
I'm using VS .NET 2003, and I am designing a web application in VB .NET, I'm just wondering, Tekmaven mentioned to me in another thread of mine that it would be a good idea to use the datalist control as a menu, how would I use it to get menu's much the same as those on this site, or any control for that matter.
Thanks again guys,
Slade
I'm using VS .NET 2003, and I am designing a web application in VB .NET, I'm just wondering, Tekmaven mentioned to me in another thread of mine that it would be a good idea to use the datalist control as a menu, how would I use it to get menu's much the same as those on this site, or any control for that matter.
Thanks again guys,
Slade
Formerly known as Slade.
Umm, that is a kind of a wide open question you have asked. confused:
Here is some code to get you started:
Now in the Code behind or Script Code place
Hope this helps.... Maybe Tekmaven has something to add to this? :
Here is some code to get you started:
ASP.NET Syntax (Toggle Plain Text)
<asp:DataList id="dlMenu" runat="server" ..... .... .... OnItemCommand="dlMenu_ItemCommand" ....> .... <ItemTemplate> <asp:LinkButton id="btnItem1" runat="server" Text='<%Container.DataItem("MenuValue1")%' CommandName="select" /></ItemTemplate> </asp:DataList>
Now in the Code behind or Script Code place
ASP.NET Syntax (Toggle Plain Text)
public sub dlMenu_ItemCommand(obj as Object, e as DataListCommandEventArgs) dlMenu.SelectedIndex = e.Item.ItemIndex ' ||||| Do what you want with the selected Item . Navigate, etc end sub
Hope this helps.... Maybe Tekmaven has something to add to this? :
•
•
Join Date: Jun 2006
Posts: 5
Reputation:
Solved Threads: 0
Great article!
I also posted a tutorial at www.KYNOU.com about DataList control in asp.net
Go to www.KYNOU.com and search for: DataList Control
There is also a chat room where I try to spend a lot of time answering questions. Stop by if you want.
I also posted a tutorial at www.KYNOU.com about DataList control in asp.net
Go to www.KYNOU.com and search for: DataList Control
There is also a chat room where I try to spend a lot of time answering questions. Stop by if you want.
![]() |
Similar Threads
- How to have datalist control with allow paging using asp.net with C#? (ASP.NET)
- DataList Control (ASP.NET)
- check\uncheck all checkboxes in datalist control (ASP.NET)
- checkbox checkchanged event not firing in datalist control (ASP)
- Datalist Repeater Help (ASP.NET)
- ASP.NET menu control is not working with IE6.0 (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Limitation
- Next Thread: E-mail not working
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu dynamically edit expose fill flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery listbox login menu microsoft mono mouse mssql multistepregistration news numerical objects opera order panelmasterpagebuttoncontrols radio ratings registration reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





