This project is read-only.
To know how to enabled Asp.Net Routing on your web site, visit this page :
http://msdn.microsoft.com/en-us/library/cc668201.aspx

When Asp.Net Routing is enabled you have to :
  1. Referer mal.Web.Routing.dll in your web site
  2. 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>
  1. 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>
  1. Initialize routes in the Application_Start in Global.asax :
protected void Application_Start(object sender, EventArgs e)
{
    RouteConfigurationManager.Initialize();
}

Last edited Mar 31, 2011 at 5:48 AM by malbaladejo, version 2

Comments

No comments yet.