473,386 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to Redirect to Another Already Open Page (Managing Multiple Open Pages in ASP.Net)

TC
Hello,

In ASP.Net via C#, but if someone can help me with a VB.Net example that's
fine too, I am trying to redirect to a page that is already open.

For example, when a user clicks a submit button on the main page, a new
window is opened that displays the material. The user then goes back to the
main page and makes changes and clicks the submit button again.

Rather than opening a new window again, I want the user to be redirected to
the original second page.

Does anybody have VB.Net or C# sample code for this?

Thanks & Regards,

TC
Nov 19 '05 #1
3 1060
Give a name for the new window - 2nd parameter for window.open(). If the
browser finds a window opened already with the given name, then it will
reuse it.

E.g.:

var p = window.open ("http://www.google.com", "Google");
p.focus();

"TC" <ge**********@yahoo.com> wrote in message
news:Ok**************@TK2MSFTNGP15.phx.gbl...
Hello,

In ASP.Net via C#, but if someone can help me with a VB.Net example that's
fine too, I am trying to redirect to a page that is already open.

For example, when a user clicks a submit button on the main page, a new
window is opened that displays the material. The user then goes back to the
main page and makes changes and clicks the submit button again.

Rather than opening a new window again, I want the user to be redirected to
the original second page.

Does anybody have VB.Net or C# sample code for this?

Thanks & Regards,

TC

Nov 19 '05 #2
TC
Shiva,

Thanks a bunch!

I finally understand. I was having some trouble with the javascript
implementation.

I will post a code sample in a bit for all of those who are to follow.

Best Regards,

TC
"Shiva" <sh******@online.excite.com> wrote in message
news:uK**************@TK2MSFTNGP15.phx.gbl...
Give a name for the new window - 2nd parameter for window.open(). If the
browser finds a window opened already with the given name, then it will
reuse it.

E.g.:

var p = window.open ("http://www.google.com", "Google");
p.focus();

"TC" <ge**********@yahoo.com> wrote in message
news:Ok**************@TK2MSFTNGP15.phx.gbl...
Hello,

In ASP.Net via C#, but if someone can help me with a VB.Net example that's
fine too, I am trying to redirect to a page that is already open.

For example, when a user clicks a submit button on the main page, a new
window is opened that displays the material. The user then goes back to
the
main page and makes changes and clicks the submit button again.

Rather than opening a new window again, I want the user to be redirected
to
the original second page.

Does anybody have VB.Net or C# sample code for this?

Thanks & Regards,

TC

Nov 19 '05 #3
TC
Below is code that, for the most part, works. However, one has to click the
button twice in order to actually re-direct with focus.

private void btnNewPDFWindow_Click(object sender, System.EventArgs e)

{

string NewPage = "NewPageZoom.aspx";

string ScriptBlockNewPage = "<script language='javascript'>var
NewPDFPage=window.open('" + NewPage + "','PDFPage');";

ScriptBlockNewPage = ScriptBlockNewPage + "NewPDFPage.focus();</script>";

Response.Write(ScriptBlockNewPage);

}


"Shiva" <sh******@online.excite.com> wrote in message
news:uK**************@TK2MSFTNGP15.phx.gbl...
Give a name for the new window - 2nd parameter for window.open(). If the
browser finds a window opened already with the given name, then it will
reuse it.

E.g.:

var p = window.open ("http://www.google.com", "Google");
p.focus();

"TC" <ge**********@yahoo.com> wrote in message
news:Ok**************@TK2MSFTNGP15.phx.gbl...
Hello,

In ASP.Net via C#, but if someone can help me with a VB.Net example that's
fine too, I am trying to redirect to a page that is already open.

For example, when a user clicks a submit button on the main page, a new
window is opened that displays the material. The user then goes back to
the
main page and makes changes and clicks the submit button again.

Rather than opening a new window again, I want the user to be redirected
to
the original second page.

Does anybody have VB.Net or C# sample code for this?

Thanks & Regards,

TC

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: PaulThomas | last post by:
Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx" but the application always starts the "Login" page - - - How can I change the start page to the Home.aspx??? On the login...
4
by: Jim in Arizona | last post by:
I'm wanting to do a simple controlled voting page. I too our webserver off anonymous and everyone who accesses the website is a domain authenticated user. I've already done some control structure...
3
by: TC | last post by:
Hello, In ASP.Net via C#, but if someone can help me with a VB.Net example that's fine too, I am trying to redirect to a page that is already open. For example, when a user clicks a submit...
3
by: Pooja Renukdas | last post by:
Hello, I have this web site where only two pages have to be secure pages and I need to call them using https, but since I have my development server and my production web server, I dont want to...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
6
by: Rudy Soto | last post by:
Can someone please tell me how I can redirect the user back to the start page? Let's say I have the following folders in IIS, with the pages included: Menu login.aspx menu.aspx Customers...
6
by: Coleen | last post by:
Hi all :-) I need to redirect to multiple pages on click of a transmit button, without redisplaying each page. This redirection is to capture session variables that are created on each page and...
4
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world,...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain variables to their webforms through a form on my...
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.