1,105,380 Community Members

Url routing not working....Page isn't redirecting properly...

Member Avatar
korathualex
Light Poster
41 posts since Jan 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

`

web..config
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="UrlRoutingModule"/>
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
    <handlers>
      <add
        name="UrlRoutingHandler"
        preCondition="integratedMode"
        verb="*" path="UrlRouting.axd"
        type="System.Web.HttpForbiddenHandler, System.Web,  
              Version=2.0.0.0, Culture=neutral,  
              PublicKeyToken=b03f5f7f11d50a3a"/>
    </handlers>

  </system.webServer>

`

Tried the following code under global.asax of application_start
RouteTable.Routes.MapPageRoute("Category", "categories/{id}", "~/JobReport/WebForm1.aspx?id=longvalue");
and under page load of the page as
Response.RedirectToRoute("Category", new { id = "1"});
But page isn't redirecting properly shown...

LastMitch
Deleted Member
 
0
 

But page isn't redirecting properly shown...

I assuming you are using MVC?

Read this:

http://msdn.microsoft.com/en-us/library/cc668201%28v=vs.100%29.aspx

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: