newbee question: How to call a second aspx

  • Thread starter Thread starter EMW
  • Start date Start date
E

EMW

I have created a page in aspx and after a click on a button, a new page
should open.
How is this possible?
I tried it doing it like in vb.NET with opening a new form, but it doesn't
work.

rg,
Eric
 
You probably want to use Response.Redirect or Server.Transfer.

Response.Redirect(NextPageURL) will actually respond back to the browser,
and tell it to request the NextPageURL. Server.Transfer will, on the server,
redirect to the page - the URL in the browsers address bar will be left as
the original page, and if this doesn't matter, its the most efficient.

Or do you mean open up in a new browser window (the above solutions will
normally change the page in the existing browser window)

HTH,
Pete Beech
 
Do you mean that you want to second page to open in a completely new
browser window? Or just open a page in the same window. If it's the
latter, you can use Response.Redirect(newPage) or Server.Transfer(newPage)
depending on which will suit your needs.

Chris

--------------------
 
both actually.


Pete Beech said:
You probably want to use Response.Redirect or Server.Transfer.

Response.Redirect(NextPageURL) will actually respond back to the browser,
and tell it to request the NextPageURL. Server.Transfer will, on the server,
redirect to the page - the URL in the browsers address bar will be left as
the original page, and if this doesn't matter, its the most efficient.

Or do you mean open up in a new browser window (the above solutions will
normally change the page in the existing browser window)

HTH,
Pete Beech
 
Hi Eric,

This is completly different than in windowforms, both is of course VB.net.

You got the right answer from Chris Moore, so I do not repeat it.

Cor
 
Back
Top