I have a simple mvc web application , in which i have a menu like
home,services,contactus when i click the service menu the new service controller invokes and new view opened, and this view have service details and also a read more button , when i click the read more button I want to show the more details like description of that service, all these things are working properly , The issue is that when i click the Readmore linkbutton on service view It loses the Path of my JS and Css , so my _Layout.cshtml having the slider and it did not show the images of that slider just of the Details view of Read more I inspact the issue and check that it loses the path when i inspect the element

this is correct path but when i hover on img it show the path like that
http://localhost:60553/Service/Images/img/rsz_malibu-2.png Failed to load resource
I mean it is looking my CSS JS and images in Service Folder instead of root folder how to fix that
Mark TaborPosted Oct 2, 2016, 9:57 AM
Mark TaborPosted Oct 2, 2016, 9:47 AM
Midhun TpPosted Oct 2, 2016, 8:43 AM
Instead of ../ try using ~/
Mark TaborPosted Oct 2, 2016, 6:37 AM
Mark TaborPosted Oct 2, 2016, 5:47 AM
Midhun TpPosted Oct 1, 2016, 12:33 PM
Please have a look at below threads-
http://stackoverflow.com/questions/9779340/mvc-partial-views-loses-track-of-the-images-folder-when-using-jquery
http://scottonwriting.net/sowblog/archive/2010/05/11/resolve-a-url-from-a-partial-view-asp-net-mvc.aspx
Delpin Susai RajPosted Oct 1, 2016, 12:14 PM
Delpin Susai RajPosted Oct 1, 2016, 12:13 PM