Solved

Get list of available themes in App_Themes folder

Posted on 2008-10-27
1
372 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Calculate number of nights between two dates 5 53
JSON  parse help 7 40
jquery + C#.net radiobuttonlist 3 30
looking for an ASP.net report designer 4 9
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

861 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