.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Difference between Server.Transfer & Server.Execute.

Posted By:varun bansal       Posted Date: July 28, 2009    Points: 25    Category: ASP.NET    URL: http://www.dotnetspark.com  
 

Server.Transfer and Server.Execute function use to redirect the page to the user but little different is that....

These two functions required 2 parameters;
the first is the webform name to which you want to redirect the user
and the second is a bool parameter to specify if you want the form to be reserved.

  Ex: 

protected void Button1_Click1(object sender, EventArgs e)

{  

Server.Transfer("WebForm2.aspx", true);
}


            
Now in webform2 page_load event use the below code to get the value of TextBox1
            
Response.Write(Request.Form["TextBox1"]);
Same Code for Server.Execute..


Varun Bansal
www.varunbansal007.blogspot.com
 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend