473,382 Members | 1,424 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 2105
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*********@gmail.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.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_Sample%>" 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*********@gmail.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.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
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!):...
2
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...
2
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...
7
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...
4
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...
20
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...
1
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
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...
4
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.