views:

140

answers:

0

I have master page and my other pages like index, category etc in the same folder (root), and the root folder also has _images folder and _includes folder that contains some ascx controls.

Now, the images seem to be working fine for "img" tags, but it's working very oddly for ImageButtons. Apart from index page, it is usually unable to find the image.

Now, I also have url rewriting goin on... so I could have Category path like

mydomain.com\Category\Category1\Category2.aspx where Category1 folder does not physically exist.

In my master page, I am resetting my <base runat="server" id="BaseNode" />, so base always points to the root folder.

However, I think ImageButton is not recognizing the resetting and thinks it still needs to dig deeper. When I look at page source, img tags are using "images/imagename.jpg" as source while ImageButtons are using something like "../../images/imagename.jpg" as source.

What puzzles me though is even something like "~/images/imagename.jpg" is not working for ImageButtons.

related questions