Somebody can tell me, what sentence i should to use to call another page from one page in asp. net
13-01-2003 at 06:02 PM
|
Lycaon Level: Guest
Re: Sentence for call another page from asp pages
This is like a 'gosub' or function. It essentially transfers everything to somepage.asp, runs it as if it were the page that were called originally, then the control returns back to the original page.
Response.Execute "somepage.asp"
This does the same as above but control is NOT returned to the calling page. Once otherpage.asp is done 'running' control stops there.
Response.Transfer "otherpage.asp"
23-06-2004 at 04:59 PM
|
zimcoder Level: VB Lord Registered: 27-10-2003 Posts: 225
Re: Sentence for call another page from asp pages
There are primarily 4 ways to pass control form one page to the other in ASP.NET
These are
1) Html anchor tag with href attribute <a href="newpage.aspx">next Page </a>
2) Using the response object .. this is used normally in the click event of a server side control
Response.Redirect("newpage.aspx")
3) Using the server.transfer method this is alse normally within an event of a server side control
Server.Transfer("newpage.aspx")
4) Using the Meta tag . this is usually done with the refresh attribute.
<meta name="user_login" http-equiv="refresh" content="3;url=Login.aspx">
In this scenario the current page will refresh in three seconds and redirect to the Login page.
____________________________
BrainBench ADO.NET and ASP.NET Certified Developer