0
void RegisterRoutes(RouteCollection routes)
{      
    routes.MapPageRoute("cats", "categories/{ct1}/{ct2}", "~/mypage1.aspx", false, new RouteValueDictionary { {"catname",""}});
    routes.MapPageRoute("lists", "lists/{li1}/{li2}", "~/mypage2.aspx", false, new RouteValueDictionary { {"liname",""}});       
}

and I have registered routes

protected void Application_Start(object sender, EventArgs e)
{  
    RegisterRoutes(RouteTable.Routes);  
}

but the problem is the first route works perfectly but it says resource not found in second route
the annoying thing is it is finding the proper route because if I comment the second route then it will give compile time error of no matching routes. I tried to redirect to the route with different methods but none works..
this is working

<a href='<%# GetRouteUrl("cats",new {ct=Eval("Category_Id"),catname=Eval("Category_Name")}) %>' 

but this doesnt

<a href='<%# GetRouteUrl("lists",new {lid= Eval("List_Id"),liname=Eval("List_Name_Url")}) %>'>

it doesnt work even from code behind..
I even changed the route and added 1 more parameter and changed accordingly, but still it didn't find it..I even removed the optional parameter setting from the lists route, but still not working.. check the link below

checkitouthere

Click on readmore button or link in jquerytab or on image
it is working on local..
how does it works on local but not on server... even when i put connection string of server in my local computer then it doesnt work.... it works on local with local connection string..

Vishal Ravlani
  • 425
  • 3
  • 12

1 Answers1

0

There is issue with your "Read More" url, try allowing "." in the web.config:

See this is working:

http://www.superduper10.com/lists/1/top-ten-european-cities-to-visit

If you are using .NET 4.0, you can set this flag in the system.web section of your web.config and it will allow you to have dot in the end of url:

<httpRuntime relaxedUrlToFileSystemMapping="true" />

See this:

"The resource cannot be found." error when there is a "dot" at the end of the url

Community
  • 1
  • 1
Kapil Khandelwal
  • 15,958
  • 2
  • 45
  • 52
  • yes it is working like this...but not even removing by dot but if you just change anything in the url and it works..like you just add any word or letter anything to the url and it will load even if the dot exists.. – Vishal Ravlani Aug 30 '12 at 08:32
  • i was about to remove the dot..but it works now..thanx...i would have voted up but cant because it needs minimum 15 repo... – Vishal Ravlani Aug 30 '12 at 08:44