Menu item from database in ASP.Net

J

jayender.vs

Hi,

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

Code:
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" >

<Items>

<asp:MenuItem Text="<%=m_Menu[0]%>" Value="New Item"></asp:MenuItem>

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

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

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

</Items>


</asp:Menu>
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 ..
 
J

jayender.vs

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top