SanSYS

sansys.net: http://goo.gl/wiPgUU

Mar 9th, 2015
8,389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System.Web.Routing;
  2. using Microsoft.AspNet.FriendlyUrls;
  3.  
  4. namespace GenericHandlersAndRouting
  5. {
  6.     public static class RouteConfig
  7.     {
  8.         public static void RegisterRoutes(RouteCollection routes)
  9.         {
  10.             var settings = new FriendlyUrlSettings();
  11.             settings.AutoRedirectMode = RedirectMode.Permanent;
  12.             routes.EnableFriendlyUrls(settings);
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment