Skip to content

Automatically Route All Pages at Once in ASP.NET WebForms

License

Notifications You must be signed in to change notification settings

muhtadii/Auto-Route

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto-Route

Automatically Route All Pages at Once in ASP.NET WebForms

The idea of the code behind: https://github.com/adriancs2/Auto-Route/wiki

How to Use This Library

First, add the Nuget package of adriancs.AutoRoute.

Then, add a Global Application Class into the project:

Open the file:

To route ASPX pages at specific folder:

protected void Application_Start(object sender, EventArgs e)
{
    // route all aspx pages in the project
    // scan through all folders (including folders of javascript, images, css)
    AutoRoute.RouteAllPages();

    // route all aspx pages in specific folder, including sub-folders
    AutoRoute.Route("~/pages", true);

    // route all aspx pages in specific folder, do not include pages in sub-folders
    AutoRoute.Route("~/pages", false);
}

About

Automatically Route All Pages at Once in ASP.NET WebForms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 71.7%
  • ASP.NET 28.3%