Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Using multiple web forms

thorskonnord

New member
Joined
Jul 14, 2001
Messages
9
My application opens a second web form to do calculations. I use Response.Redirect to open the second page.

When returning to the first page, I need all the values to be retained. In order to do this, the Return button (btnClose) in the second form uses this in Page_Load:

Code:
btnClose.Attributes.Add("onClick", "javascript:history.back(); return false;")

This makes btnClose work as if the user clicked the back button.

This works great except for one thing. Once returning to to the first web page, a click on any button re-opens the previous, second web form.

I am sure that there is a better way to do this, I can open the second page as a pop-up using JaveScript. This leaves the first page open, which is great. But what I cannot figure out is how to close the second page after being done with it.

Any help would be greatly appreciated!
 
Joined
May 20, 2005
Messages
104,556
You're asking in the desktop forum. Try the ASP.Net forum...

http://www.vbforums.com/forumdisplay.php?31-ASP-NET-And-ASP-NET-Core

I have already asked the mods to move this thread to that forum, so please don't create a duplicate thread.

That said, the VB.NET forum is not for desktop apps specifically. If a question relates to code in a web app but it is about VB.NET generally, e.g. string manipulation or data access, then this is still an appropriate place for it. If the question is specific to ASP.NET though, e.g. relates to JavaScript as well as VB.NET, then the dedicated ASP.NET forum is the place for it.
 

.paul.

eXtreme Programmer
Joined
May 26, 2007
Messages
23,067
Ok vb general, but mostly desktop...:thumb:
 

si_the_geek

Super Moderator
Joined
Jul 29, 2002
Messages
41,398
Thread moved to the 'ASP.Net' forum, which is where questions about .Net web pages etc belong
 
Top