Is there a way to use a URL to point to the current app_theme folder ie
|App_Theme|Reporting\MyFile.jpg
It HAS to be a URL, I can't get round it using a SkinID.
Printable View
Is there a way to use a URL to point to the current app_theme folder ie
|App_Theme|Reporting\MyFile.jpg
It HAS to be a URL, I can't get round it using a SkinID.
I can't understand ur requirement
I'm not sure I can make it any simplier. I have to enter a URL for a file.
ie MyImages/Myimage.jpg
When my image is dependant on a theme, the theme directory can be modified by the website to choose the best theme for themselves. So if the current theme is "default" the path of the file would be
App_Themes/default/MyImages/MyImage.jpg
So, if they changed the theme to "simple" the location of the file would be
App_Themes/simple/MyImages/MyImage.jpg
I need a method/way to allow me to automatically change a URL to match the current theme. You can do this with the data path with something like this
|Data|MyFile.XML
Is there a way to do this for a URL?
Sorry... you still don't make sense.
The first part makes sense, but this doesn't:
What do you have in the themes folder that you're trying to access in there?Quote:
I need a method of this URL to automatically change to match the current theme.
Edited for clarity.
Mostly I am getting images for say a grid control or a tree view control that only allows me to specify the URL of the image for entries/nodes.
Heres another post asking exactly the same question:
http://forums.asp.net/t/1001497.aspx
It appears that you are looking for creating Skins for your controls.
http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx
Does that give you a good idea of what to do?
Thanks for the investiagation, however as I posted in my first post, I can't use Skins.
Ah, sorry, we're in circles.
So you could then derive the path to the theme folder you want.
"~/App_Themes/" + Page.Theme + "/restofthepath";
That should be close enough to what you need.
Well, if the page.theme is set to the current theme (from the config.xml) then I can make that up. I'll just have to modify everything by code and wont get to see it in the designer. Spose I could use a default value actually so that might work as well. I'll try it on Monday, thanks.
If you're using a master page or a base page, create a public property that does a bit of this 'logic' for you and access it from the 'child' pages.