Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 23rd, 2006, 08:01 AM
Registered User
 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding Menu Items using VB

Hi I'm new at this but here is my problem
I have a asp menu control which I have not linked to any data source.
Using VB I written the following code:

Dim MItem As New MenuItem
MItem .Text = "Item1"
Menu1.Items.Add(MItem)



This code works fine if I only want to add 1 item to the menu control but returns the following error if I return more that 1:

"Index must be within the bounds of the List.
Parameter name: index"


Can some help?

<SamP>





Similar Threads
Thread Thread Starter Forum Replies Last Post
CH 15 Context Menu - Element Menu Items Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 2 November 9th, 2008 03:53 PM
menu items visible always once heading selected. Hughesie78 ASP.NET 2.0 Professional 1 July 17th, 2008 01:22 AM
Store Items from dropdown menu in mysql database scoobie PHP Databases 0 April 28th, 2005 08:17 AM
Menu Items JoBi C# 0 October 20th, 2004 08:51 PM
Two data items from a populated dropdown menu bear1138 Dreamweaver (all versions) 1 August 13th, 2003 09:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.