I want to be able to do a Response.Redirect(“MyPage.aspx”) but have it open in a new browser window. Want to do this without using the JavaScript register script method. How do I go about doing this?
James from Rockville
I want to be able to do a Response.Redirect(“MyPage.aspx”) but have it open in a new browser window. Want to do this without using the JavaScript register script method. How do I go about doing this?
James from Rockville
Comments are closed.
You need to add the following to your server side link/button in your web development program:
OnClientClick="aspnetForm.target ='_blank';"
In the server side OnClick I do a Response.Redirect(“MyPage.aspx”); and the page is opened in a new window. There is one other part you need to add is to change the form’s target back otherwise every link will open in your web development project will open in a new window. To do so add the following in the header of your new window.
And