Click here to Skip to main content
15,880,972 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello , i want to set a page that will redirect every error to a specific page and thanks
Posted
Comments
Ankur\m/ 6-Mar-14 7:24am    
ASP.NET?

Hi,

You can use Conditional parameter in conjunction with webbrowser class's Navigate() method to navigate to respective page you are willing to redirect.

VB
If this resolves your issue; please mark the question as answered & Acknowledge the same.

Regards,
Subhash Konduru
 
Share this answer
 
Comments
Ankur\m/ 6-Mar-14 7:26am    
Can you please explain?
insert a Global.asax page in your project.
try this type

C#
void Application_Error(object sender,EventArgs e)
{
Execption ex=Server.GetLastError();
if(ex!=null)
{
Response.Redirect("your error Page");
}
}
 
Share this answer
 
There is an out of box support in ASP.NET for this very thing. You just need to configure CustomError[^] node in your web.config file. Set the mode to On and set defaultRedirect to a url that you want to redirect to. That's all. Checkout the above link for more settings and details.

Hope that helps!
 
Share this answer
 
Quite good article is given on MSDN itself regarding your problem. Take a look it at here[^].

-KR
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900