To know how to enabled Asp.Net Routing on your web site, visit this page :
http://msdn.microsoft.com/en-us/library/cc668201.aspxWhen Asp.Net Routing is enabled you have to :
- Referer mal.Web.Routing.dll in your web site
- Add the following section group in the web.config :
<sectionGroup name="RouteConfigurationGroup">
<section name="RouteConfiguration" type="mal.Web.Routing.RouteSection, mal.Web.Routing" allowLocation="true" allowDefinition="Everywhere"/>
</sectionGroup>
- Configure routes :
<RouteConfigurationGroup>
<RouteConfiguration>
<Routes>
<add Name="url1" Uri="url1" MappedUri="~/default.aspx"/>
<add Name="url2" Uri="url2/{culture}" MappedUri="~/default.aspx">
<Defaults>
<add Name="culture" Value="en-US"/>
</Defaults>
<Constraints>
<add Name="culture" Value="(en-US|fr-FR)"/>
</Constraints>
</add>
<add Name="url3" Uri="url2/{culture}/{id}" MappedUri="~/default.aspx"/>
</Routes>
</RouteConfiguration>
</RouteConfigurationGroup>
- Initialize routes in the Application_Start in Global.asax :
protected void Application_Start(object sender, EventArgs e)
{
RouteConfigurationManager.Initialize();
}