How to use Server.Execute within the server side VB.net ?

  • Thread starter Thread starter Oscar
  • Start date Start date
O

Oscar

What's the right coding to open another aspx page within server side vb.net
(not within the html) ?

In case I only code Server.Execute("page2.aspx") with a VB.net Subroutine,
the browser shows a mess of both page 1 and page 2 within the same window.
 
Can you clarify what you mean by opening another aspx page?

The Server.Execute will essentially run another ASP.Net page, but it will
still run the code and display the HTML up to the point where the call was
made. Useful in certain scenarios but maybe isn't appropriate here.

Do you want to simply transfer to another page? In that case you could use
Response.Redirect to redirect to the other page. There's also
Server.Transfer, but sometimes that is not as useful and has it's own set of
issues.

In any case, if you could illustrate to us exactly how you intend to open
the other page that would help us understand exactly which method to use.
 
Thanks Mark,

Yes I only needed to link to another page
Using Resonse.Redirect or Server.Transfer solved my problem.
I was somewhat mislead by Jon's advice to use Server.Execute

regards,
Oscar
 
Back
Top