1
Answer

Can we route css and js file in asp.net mvc?

Photo of nitin yadav

nitin yadav

7y
1.7k
1
Can we route css and js file in asp.net mvc?
 
I want to add some rule in route.config file
 
css file is coming like below from document viewer
 
<link href="/resource.ashx/636598219420000000/du/viewer.css" rel="stylesheet"> 
 
and i want some kind of rule which is like this
routes.MapRoute("/documents/resources/{resource}.ashx/{*pathInfo}", "{resource}.ashx/{*pathInfo}"); 
 
means,  documents/resources/{resource}.ashx/{*pathInfo}" redirect to /resource.ashx/636598219420000000/du/viewer.css

Answers (1)