This is a migrated thread and some comments may be shown as answers.

[Solved] Session value in the menu item

1 Answer 164 Views
Menu
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 20 Jun 2008, 07:29 AM
hi

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

<

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

</telerik:RadMenuItem>

and is not working. Thanks

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 20 Jun 2008, 01:14 PM
Hello,

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
Tags
Menu
Asked by
L
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or