Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have implemented routing on my website and almost everything works fine but I get an error message for any include because the path is wrong cause of the routing.
I try to be more clear and show my code.
Starting from my link in my home page

<a href="search/shose/" title="" > <img  class="borderBlack"  src="immagini/b5.jpg" alt="" /></a>


than in the global.asax just added for the purpose

ASM
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
     Me.RegisterRoutes(RouteTable.Routes)
End Sub

Sub RegisterRoutes(ByVal routeCollection As RouteCollection)
      routeCollection.Ignore("{resource}.css/{*pathInfo}")
      routeCollection.Ignore("{resource}.axd/{*pathInfo}")
      routeCollection.MapPageRoute("RouteForpage", "search/{typology}/", "~/search-by-typology.aspx")
End Sub


as you can see there I added ignore .css file but I don't know why when I click on the link above open the right page but through dev tool I see lots of error messages 404 for any link o my page. this is one of them inside the page
search-by-typology.aspx


<link rel="stylesheet" href="modifiedStyle.css"  type="text/css" media="screen" />


why the ignore is not working fine, am I missing something?

Thank you in advance for your help
Posted

1 solution

]]>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900