ASP.NET 2.0 menu question

L

lstuyck73

Hi there,

I use a menu control that is bound to a sitemap to display menu items,
no problems there.

I now have one menu item that needs to open an url in a new window,
and I have to dynamically add some querystring value to that URL. So I
need the menu item to do something like

window.open("http://newurl/page.aspx?value=5");

and the value of the querystring depends on the user so I have to be
able to set this value dynamically when the page is loaded...

I assume that I can't use the sitemap to specify such menu item? Is
there another solution?

Thanks!
 
L

lstuyck73

Hi there,

I use a menu control that is bound to a sitemap to display menu items,
no problems there.

I now have one menu item that needs to open an url in a new window,
and I have to dynamically add some querystring value to that URL. So I
need the menu item to do something like

window.open("http://newurl/page.aspx?value=5");

and the value of the querystring depends on the user so I have to be
able to set this value dynamically when the page is loaded...

I assume that I can't use the sitemap to specify such menu item? Is
there another solution?

Thanks!

Found a workaround.. in the MenuItemDataBound event I modify the
NavigateUrl of the menu item.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top