Get Directory App_Data in A Static Helper File
What am I supposed to write as CategoryPath to get the file in the App_Data folder?
Thanks
/// <summary>
/// Summary description for XMLHelper
/// </summary>
public static class XMLHelper
{
public static string CategoryPath = "App_Data/Categories.xml";
public static void InsertCategory(string categoryName, string moderator)
{
XElement cat = XElement.Load(CategoryPa开发者_StackOverflow社区th);
Try
AppDataDir = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"App_data")
Then just append the filename required. I haven't tested that code.
Hope it helps
精彩评论