Welcome Guest Search | Active Topics | Sign In | Register

Passing SessionId in querystring of NavigateURL of Menu Options
sstoos
Posted: Wednesday, October 31, 2007 4:34:45 PM
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!
eo_support
Posted: Wednesday, October 31, 2007 5:32:56 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.