I am sending mail using .net c# code. In that mail i am providing link of customer website. When anyone click on link (in outlook mail) then it will open new window if already not opened any window. Suppose user already working in IE browser [URL] and then user click on link using outlook mail then link open in new tab in already opened IE browser window. So i want that everytime open new browser window when click on link.
I'm using the following span to open a page in a new window. What is INCREDIBLY odd is that it is exactly the same code from three different pages, but the first refuses to open in a new window. The only difference is that the first example resides within an Ajax Accordian Panel so I suspect that it might be an Ajax related issue.
First, I've taken the time to review this question which seems to be the most similar, however, the solution that seems to have been selected will not work in my scenario.Not to mention I worry about some of the comments claiming it to be brittle or an inadequate solution.
-We have an XML document which basically contains all of the information for a Side menu.
-We have numerous URLS which are stored in a constants class.
-One of the elements in a string of XML (well call it label) is used to determine if the menu item is created as a LinkButton or a Label.
-Links use a custom user control that is used standard for all links across the application (why suggestion on similar thread doesn't work - I don't want all links to open in a new window - just one)
-One of the elements in a string of XML (well call it function) is used in a Switch statement to generate our links using Response Redirect.
It may look something like this.
Given this scenario, I'm trying to find the best way to quickly open a New Window, when a specific case in this switch statement is met. Can it be done with Response Redirect (this seems to be arguable - people say no it can't, yet other people say they have made it work)? If not, what alternative can work here?
Is it possible to Open a new browser tab/window using c#. I have query string info I don't want to put in a hidden field due to it showing on the client side. I do save the data in ViewState and encrypt the viewstate; however, I don't know how to access that information on client side.
I can access the viewstate data fine on Server Side but I need to open the new browser window on server side in order to access the ViewState. I may be wrong. Is there a trick to this?
I did find a way; however, on any other click after the initial click everything goes to a new window:
When I run this code as non secure with HTTP, everything works just like it should. The report opens.
Is there any difference using those two different URLs with default.aspx and without it, because in development it behaves the same way, but under HTTPS one page doesn't exist and another is blank?! Is HTTPS the reason for that?