ASP.NET - How to clear your friendly URL routes


Scenario:

You are using "System.Web.Routing" and you want to clear routes that you setup when your application loaded (and then possibly re-load with updated content).

Solution:

You can clear the RouteTable with this command:

VB.Net

System.Web.Routing.RouteTable.Routes.Clear()

C#

System.Web.Routing.RouteTable.Routes.Clear();

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.