Currently, when the menu item is clicked on the web page in the event handler the new url is assigned to Response.Redirect and so it is opening in the same window. I want to be able to open the new url in a new tab keeping the main webpage open. I tried giving target="_blank" to the menu item and it doenst help . Can you suggest a solution?
Asked
Active
Viewed 4,081 times
0
-
Check this : [ASP.NET Response.Redirect to new window](http://stackoverflow.com/questions/104601/asp-net-response-redirect-to-new-window) – Anchit Jun 28 '12 at 20:41
2 Answers
0
Just attach a client side handler instead of a server side one.
Formally - instead of the "OnClick" attach "onmenuitemclick" to a javascript expression which opens new window - "window.open( ... )".

Wiktor Zychla
- 47,367
- 6
- 74
- 106
-
sepecifying Navigateurl="newurl" Target="_new" serves the purpose, but the new url is only updated dynamically on servere side. So am trying to find a way where I can set the navigate url property on serverside. – 8GB Jun 28 '12 at 18:17
0
I assume need to do a POST so you can calculate the new URL based on some posted data?
If that's the case, you could set target="_new" on the form tag - targets work for POSTs as well as GETs.
Or you could return the new URL to the client and then do a window.open when the page reloads.

graham mendick
- 1,839
- 1
- 17
- 15