Solved

Get list of available themes in App_Themes folder

Posted on 2008-10-27
1
365 Views
Last Modified: 2013-12-17
Hello,

Is there a simple way to get a list of the top-level folders in the App_Themes folder in my .NET website?  Is the simplest way to just use the Directory class to list the directories or is there some collection of themes somewhere that I can access?

Basically, I need to make a dropdown of all the themes in the website.

Thanks!
0
Comment
Question by:sushik15
1 Comment
 
LVL 6

Accepted Solution

by:
AmarIs26 earned 400 total points
ID: 22817557
The way i use is to use the Directory class to get a list of directories. As far as i know it is a reasonable way and beside you as a developer should not be putting anything in App_Themes folder which does not belong there. So its reasonsable to assume that all directories in the themes folder will be themes.
Also its best to get the list of themes and then stick the list in cache to avoid having to use the directory or directoryinfo classes.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now