473,563 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Menu item from database in ASP.Net

Hi,

I am doing a menu in asp.net here is the sample code for that:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" >
  3.  
  4. <Items>
  5.  
  6. <asp:MenuItem Text="<%=m_Menu[0]%>" Value="New Item"></asp:MenuItem>
  7.  
  8. <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  9.  
  10. <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  11.  
  12. <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  13.  
  14. </Items>
  15.  
  16.  
  17. </asp:Menu>
  18.  
  19.  
Now the m_Menu[0] is the string array which has the string
value taken from database., but am not able to display the string which
i got from database.

is there anyother way to do ? waiting for ur reply ..

Mar 31 '06 #1
3 2112
jayender,

This example may help you:

http://www.eggheadcafe.com/articles/20050531.asp

Regards,

--
S. Justin Gengo
Web Developer / Programmer

Free code library:
http://www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
<ja*********@gm ail.com> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.com.. .
Hi,

I am doing a menu in asp.net here is the sample code for that:

Expand|Select|Wrap|Line Numbers
  1.  <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" >
  2.  <Items>
  3.  <asp:MenuItem Text="<%=m_Menu[0]%>" Value="New Item"></asp:MenuItem>
  4.  <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  5.  <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  6.  <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  7.  </Items>
  8.  </asp:Menu>
  9.  
Now the m_Menu[0] is the string array which has the string
value taken from database., but am not able to display the string which
i got from database.

is there anyother way to do ? waiting for ur reply ..

Mar 31 '06 #2
Well , thanks Justin Gengo . will try it out ....
but was is the way to give the string in asp tag. like

<asp:MenuItem Text="<%=m_Samp le%>" Value="New Item"></asp:MenuItem>

where
string m_Sample ;
m_Sample = "Hello"

why is that hello is not printed in the menu item ...
anyway thanks for the url...

Regards,
Jayender.

Apr 1 '06 #3
Hi
You can try my menu item: WakiCoolBar for Asp.net. It can render menu items
from database.
Download: http://www.aspxcontrol.net
Demo: http://www.aspxcontrol.net/demo/wakicoolbar/sample.aspx
<ja*********@gm ail.com> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.com.. .
Hi,

I am doing a menu in asp.net here is the sample code for that:

Expand|Select|Wrap|Line Numbers
  1.  <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" >
  2.  <Items>
  3.  <asp:MenuItem Text="<%=m_Menu[0]%>" Value="New Item"></asp:MenuItem>
  4.  <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  5.  <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  6.  <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
  7.  </Items>
  8.  </asp:Menu>
  9.  
Now the m_Menu[0] is the string array which has the string
value taken from database., but am not able to display the string which
i got from database.

is there anyother way to do ? waiting for ur reply ..

Apr 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6003
by: madder10 | last post by:
Hi gurus, I have managed to have a menu item initially disabled and then enable at run time in my MFC application in Visual C++ 6 as explained in this thread (thanks!): http://groups.google.it/groups?q=enable+menu+item&hl=it&lr=&ie=UTF-8&selm=%2319%24Mug%24%24GA.88%40cppssbbsa05&rnum=1 But I would also like the initially disabled menu item...
2
1711
by: hzgt9b | last post by:
Using VS .NET 2003, VB: I want to assign two different menu items the same shortcut, having only one enabled at a time... is this possible? In the forms designer, I have assigned both menu items the same shortcut... the 1st menu item is visible and enabled, the second is invisible and disabled. Based on some event, I toggle when menu item...
2
1590
by: Robert W. | last post by:
I want to introduce a special "Admin" menu item into my WinForms app. It'll normally be hidden but activated by a special key-sequence. To make it more visible to a user (ex. while talking with a support person on the phone) I thought of shifting it several centimetres to the right of the "Help" menu item. The only way I could think to do...
7
3930
by: Devron Blatchford | last post by:
Hi there, I have created an owner draw menu item using DrawItem and MeasureItem in VB.NET. This seems to work well. I was wondering how I can do mouse over effects in these menus. Basically the same as the dot net menus where they get highlighted when the mouse moves over them. Does anyone have any VB dot net examples or suggestions on...
4
2900
by: Kevin | last post by:
Hello. My app uses user-based menu generation where all of the menu items are loaded from a SQLServer 2k database when the user logs in to the app. All is well except I cannot get an Access Key to load programmatically. That is, one of my entries in the database is &File, so when the menu item loads it should display in the Main Menu with the "F"...
20
3132
by: MARLON LA ROSE | last post by:
CAN ANYONE TELL ME HOW I GET THE ACTUAL OBJECT OF A MENU ITEM. IS THERE A FILTER OR SOMETHING THAT I CAN USE. I HAVE BEEN FIGHTING WITH THIS FOR ABOUT 4 HOURS NOW AND I END UP GETTING THE SAME RESULTS THIS IS WHAT I AM DOING .... Dim XmlDocument As New System.Xml.XmlDocument XmlDocument.LoadXml(p_wsFormMenu.GetMenuItemData.OuterXml) ...
1
894
by: gaffar | last post by:
sir, i have 6 tables in my ms access database and whenever i click the menu item from my apllication then the database has to be created with the 6 tables (.mdb file) please help me in the code.
1
1286
by: Paul Remblance | last post by:
Menu Class: I am trying to build a menu system where the user menu options are authorised via a database. My first thoughts are to store the menu item (name) in the database so I can point to the menu item. Is it possible to retrieve the collection of menu names (i.e. mnuFileExit) and then use that collection to enable/disable each item? (i.e....
4
3215
by: Louly | last post by:
Hi everybody, I got the code for dimming a menu item from this group after looking for it for a long time thanks to those who share their experiences with the others :) The problem I'm facing is that it dims the wrong menu item!! Example, if I write "DoCmd.SetMenuItem 0, 2, , acMenuGray", it dims the 3rd command in the 2nd menu!! It's...
0
7659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.