开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜