p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 30th, 2006, 06:49 PM
Authorized User
Points: 117, Level: 2
Points: 117, Level: 2 Points: 117, Level: 2 Points: 117, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirect to new page without closing current page

Hi,
  I have a function to determine what file to open base on user input. I like to open the file and still have the current page open.
Is there a way to open a new web page and still have the current page still open using VB?

Thanks in advance,

Peter
__________________
Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 30th, 2006, 10:48 PM
Friend of Wrox
Points: 4,166, Level: 27
Points: 4,166, Level: 27 Points: 4,166, Level: 27 Points: 4,166, Level: 27
Activity: 12%
Activity: 12% Activity: 12% Activity: 12%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,328
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, you will have to use JavaScript to open a pop-up window.  Look up the window.open() method.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old May 30th, 2006, 11:57 PM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

with the parameter _blank

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old June 3rd, 2006, 03:39 PM
Authorized User
Points: 117, Level: 2
Points: 117, Level: 2 Points: 117, Level: 2 Points: 117, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you but I was wondering about opening it using .NET Visual Basic code, i.e. response.redirect("x.aspx") NOT via hyperlink or JavaScript.

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old June 3rd, 2006, 10:27 PM
Friend of Wrox
Points: 4,166, Level: 27
Points: 4,166, Level: 27 Points: 4,166, Level: 27 Points: 4,166, Level: 27
Activity: 12%
Activity: 12% Activity: 12% Activity: 12%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,328
Thanks: 0
Thanked 1 Time in 1 Post
Default

   A redirect or transfer to another page will not keep the original page open. lt simply moves you to that page in the same browser instance.  You HAVE to use javascript in order to open a new window, while keeping the original browser/page instance open.

Jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old June 5th, 2006, 09:49 PM
Authorized User
 
Join Date: Apr 2005
Location: Fresno, California, USA.
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unfortunately, I tried to stay pure C# in my code to as you are trying to stay pure VB. I found out early that is not possible and you will have to pick up a javascript book. You don't have to master it, just get what you need out of it to make your pages richer. In this situation, you will have to do it in javascript. There is hope though. While you are looking up window.open()...look up for .net ClientScript.IsClientScriptBlockRegistered() and ClientScript.RegisterClientScriptBlock(). Those will build up to some code you will most likely use often to toss javascript out to your page whenever a button is clicked or any other server side event.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing a Page. akhilhp ASP.NET 2.0 Basics 3 May 1st, 2007 11:03 AM
redirect to page other than default page sarah lee ASP.NET 1.0 and 1.1 Basics 3 December 15th, 2006 05:45 PM
print page that is not the current page crmpicco Javascript How-To 0 July 26th, 2005 10:11 AM
reference of prev. page in current page kasanar ASP.NET 1.0 and 1.1 Professional 1 February 13th, 2005 02:49 PM
closing a pop up which also goes to a new page twowoo HTML Code Clinic 2 October 21st, 2003 05:00 AM



All times are GMT -4. The time now is 01:34 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc