3
Answers

Css and js working only route defaulte view not other view.

Hi,
    I am creating a new project in asp.net MVC but my js and css working only that view which is default set in Route not other views so give me the solution.

Answers (3)

0
Photo of Sumit Chaudhary
983 701 1.1k 6y
Hey guys,
 
   I found my error in layout which is src not perfect of js and css which was start like src='/' but i did start for src='folder_name'.
  
0
Photo of Faisal Pathan
188 10.4k 5.2m 6y
I think ,there posssibly two reason,Either you didn't use default layout in your page or script are conflicted. please check once.
0
Photo of Manav Pandya
94 19.9k 2.4m 6y
Hello
 
I hope do you mean by Shared layout ? 
 
If yes than you can follow one article for that :
 
https://www.codeproject.com/Articles/996879/Various-ways-of-using-Shared-Layout-in-ASP-NET-MVC
 
If not than please provide more information in brief 
 
Thanks