Menu item from database in ASP.Net

Discussion in 'ASP .Net' started by jayender.vs@gmail.com, Mar 31, 2006.

  1. Guest

    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 ..
     
    , Mar 31, 2006
    #1
    1. Advertising

  2. 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


    <> wrote in message
    news:...
    > 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 ..
    >
     
    S. Justin Gengo, Mar 31, 2006
    #2
    1. Advertising

  3. Guest

    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, 2006
    #3
  4. Waki Hunt Guest

    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


    <> wrote in message
    news:...
    > 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 ..
    >
     
    Waki Hunt, Apr 2, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gino
    Replies:
    12
    Views:
    1,059
    Keith Wansbrough
    Sep 1, 2004
  2. Replies:
    0
    Views:
    1,444
  3. BlueFlash
    Replies:
    2
    Views:
    468
    John Ladasky
    Aug 26, 2009
  4. mwr

    ASP.Menu in IE6, cannot select menu item when...

    mwr, Jun 16, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    259
  5. SpamProof
    Replies:
    0
    Views:
    189
    SpamProof
    Jan 25, 2004
Loading...

Share This Page