How to: load a web page into new browser window via code behind?

  • Thread starter Rob R. Ainscough
  • Start date
R

Rob R. Ainscough

In my code behind (VB.NET 2.0), I've been using
Response.Redirect("mypage.aspx") to navigate from one page to the next.
What I'd like to do now is load a new browser window and load it with the
page I specify using code behind (VB.NET). I've searched and searched but
I'm not finding an easy code behind approach to doing this -- sorta leaves
me nervous that something so very simply might be a lot more difficult to
accomplish? I've seen hokey solutions using hyperlink control, but nothing
that is clean and simple.

Any suggestions?

Do a new window also imply a new session?

Thanks, Rob.
 
D

dmshannon

Rob,

The normal way is to do it on the client-side via a hyperlink. You can
use javascript to manipulate the link's href property to send it to a
new page more intelligently.

Your other option is client-side javascript sent in the response on
postback. This path will cause problems with pop-up blockers.

Matt
 
R

Rob R. Ainscough

Thanks Matt,

I guess I'm pretty frustrated that .NET 2.0 does not have any code behind
functionality built it that would support this relatively simple task. It
seems I'm always going back to JavaScript to get the job done. Which
obviously begs the question why bother with ASP.NET at all. Wasn't the
entire point of ASP.NET to provide one single environment from which to work
in and reduce the number of languages/technologies to learn?

Rob.
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top