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

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.
 
M

Mark Fitzpatrick

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.
 
O

Oscar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top