Rank: Member Groups: Member
Joined: 10/8/2007 Posts: 18
|
I would like to append the sessionId to the NavigateURL dynamically. I have set the RaisesServerEvent to "true" and then put the following code in the Menu_ItemCreated. When I tested it, it didn't even hit the breakpoint of this function in the code behind. code: e.NavigationItem.NavigateUrl = Trim(e.MenuItem.Text.Html) & ".aspx?sId=" & Session.SessionID I also placed this same line in the Menu_ItemClick event, but when you clicked the menu, it just fires the function, but does not go to the correct page.
Please advise as to what I'm missing. I prefer to do this server side, but if someone has a good example of client side code, I would take it.
Thanks in advance!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You won't be able to use NavigateUrl and RaisesServerEvent at the same time. RaisesServerEvent posts back the same page, where NavigateUrl navigates the page to another page. So they do not happen at the same time.
The easiest way for you is probably to keep RaisesServerEvent but clear NavigateUrl. You will then be able to use Response.Redirect to redirect to the target Url inside your server side ItemClick handler.
Thanks
|