Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

ASP.NET Page Transfer best practices

, 20 Apr 2010
Rate this:
Please Sign up or sign in to vote.
Page Transfer best practices in ASP.NET.Scenario :Inside Try/Catch block, If you want to transfer/Redirect the page to another page - To avoid ThreadAbortException Option 1Use Response.Redirect("Pagetotransfer.aspx",false);OrOption...
Page Transfer best practices in ASP.NET.
 
Scenario :
 
Inside Try/Catch block, If you want to transfer/Redirect the page to another page - To avoid ThreadAbortException
 
Option 1
Use
 
Response.Redirect("Pagetotransfer.aspx",false);
 
Or
 
Option 2
 
Server.Execute("Pagetotransfer.aspx");
 
Or
 
Option 3
 
 
try
{
  Response.Redirect("Pagetotransfer.aspx");
}
catch(ThreadAbortException  ex)
{
 
}
 
The preffered way of doing is option 1 or 2. Since it eliminates Exceptions
 
I hope this helps!.
 
Regards,
-Vinayak

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Vinayaka Krishna Shenoy
Architect MindTree Ltd
India India
Motivated achiever who guides organizations in applying technology to business settings, provides added value, and creates project deliverables in a timely manner. An experienced Technical Consultant, have successfully led large project teams of more than 20 people from requirements gathering to implementation and support using C#, .NET ,ADO.NET, ADO.NET Entity Framework,ASP.NET,ASP.NET MVC, WCF and SQL Server.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140922.1 | Last Updated 21 Apr 2010
Article Copyright 2010 by Vinayaka Krishna Shenoy
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid