Session value in the menu item

2 posts, 0 answers
  1. L
    L avatar
    298 posts
    Member since:
    Apr 2008

    Posted 20 Jun 2008 Link to this post


    How do i write a session value to a menu item? I tried using this:


    telerik:RadMenuItem runat="server" Text='<%=Session("name") %>'>


    and is not working. Thanks

  2. T. Tsonev
    T. Tsonev avatar
    2834 posts

    Posted 20 Jun 2008 Link to this post


    Such syntax is not allowed for inline menu items. However, you can set the text through the code behind. For example in the Page_Load event:

    Private Sub Page_Load(ByVal sender As ObjectByVal e As EventArgs) 
        RadMenu1.Items(0).Text = DirectCast(Session("name"), String
    End Sub 

    Sincerely yours,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top