asp.net - URLs are not working in Deployed website -


i deploying website on iis , have issue urls. url works correctly in visual studio when publish on iis, doesn't work.

for example:

in visual studio following url works correctly:

<img src="/content/images/nopic.jpg" style="width: 105%;" > 

for deployed version url needs change:

<img src="/tlsv2/content/images/nopic.jpg" style="width: 105%;" > 

try using url.content this,

<img src="@url.content("~/content/images/nopic.jpg")" style="width: 105%;" > 

the '~' helps translates correct url. example if 'tlsv2' virtual directory then, translate above url to:

/tlsv2/content/images/nopic.jpg 

hope helps, thanks.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -