Reputation: 537
I have one master page, in short there are two images on the master page (a logo at the top, and a fb link at the bottom).
I do however have an admin folder for the .aspx pages for when admin log in.
All non-admin pages need to access these two images with the src of image/logo.jpg and image/fb.jpg. However the admin pages need to access the image with the src of /image/logo.jpg and /image/fb.jpg.
Is it possible to achieve two separate paths depending on the folder, without having to create a second master page?
Upvotes: 0
Views: 714
Reputation: 1575
use Image Server control instead of html img tag or ResolveUrl method to handle generated url:
<img src='<%= ResolveUrl("~/images/yourimage.png") %>' />
Upvotes: 1