|
-
Sep 4th, 2007, 03:54 AM
#1
[2005]Auto App_Theme path (ASP 2.0)
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.
-
Sep 4th, 2007, 09:37 AM
#2
Addicted Member
Re: [2005]Auto App_Theme path (ASP 2.0)
I can't understand ur requirement
God has been pleased to place as a king or cobbler do the work sincerely
-
Sep 4th, 2007, 01:45 PM
#3
Re: [2005]Auto App_Theme path (ASP 2.0)
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?
Last edited by Grimfort; Sep 5th, 2007 at 03:17 AM.
-
Sep 4th, 2007, 05:42 PM
#4
Re: [2005]Auto App_Theme path (ASP 2.0)
Sorry... you still don't make sense.
The first part makes sense, but this doesn't:
I need a method of this URL to automatically change to match the current theme.
What do you have in the themes folder that you're trying to access in there?
-
Sep 5th, 2007, 03:23 AM
#5
Re: [2005]Auto App_Theme path (ASP 2.0)
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
Last edited by Grimfort; Sep 5th, 2007 at 04:28 AM.
-
Sep 6th, 2007, 03:39 PM
#6
Re: [2005]Auto App_Theme path (ASP 2.0)
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?
-
Sep 7th, 2007, 03:16 AM
#7
Re: [2005]Auto App_Theme path (ASP 2.0)
Thanks for the investiagation, however as I posted in my first post, I can't use Skins.
-
Sep 8th, 2007, 10:21 AM
#8
Re: [2005]Auto App_Theme path (ASP 2.0)
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.
-
Sep 8th, 2007, 10:30 AM
#9
Re: [2005]Auto App_Theme path (ASP 2.0)
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.
-
Sep 8th, 2007, 11:10 AM
#10
Re: [2005]Auto App_Theme path (ASP 2.0)
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|