我对我的网络应用程序有疑问 [英] i have doubt in my web application
问题描述
如何从我的网络应用程序的app_data xml文件中获取设置。
举例说明。
提前感谢。
how to get settings from app_data xml file for my web application.
Give sample example.
thanks in advance.
推荐答案
请尝试以下方法:
Try as below:
string filePath = Path.Combine(HostingEnvironment.ApplicationPhysicalPath,
@"App_Data\AppSettings.xml"
);
更多信息请查看:
http://msdn.microsoft .com / zh-cn / library / system.web.hosting.hostingenvironment.applicationphysicalpath.aspx [ ^ ]
http://stackoverflow.com/questions/3063614/xelement-load-app -data-file-xml-could-not-find-of-path-of-path [ ^ ]
加载文件后,您可以按如下方式阅读;
http://www.c-sharpcorner.com/UploadFile/bulentozkir/ReadingXmlUsingXmlDocument11142005010141AM/ReadingXmlUsingXmlDocument.aspx [ ^ ]
使用.NET读取XML文件 [ ^ ]
我希望这会对你有所帮助。
More info check this :
http://msdn.microsoft.com/en-us/library/system.web.hosting.hostingenvironment.applicationphysicalpath.aspx[^]
http://stackoverflow.com/questions/3063614/xelement-load-app-data-file-xml-could-not-find-a-part-of-the-path[^]
After load the file you can read it as below;
http://www.c-sharpcorner.com/UploadFile/bulentozkir/ReadingXmlUsingXmlDocument11142005010141AM/ReadingXmlUsingXmlDocument.aspx[^]
Reading an XML file using .NET[^]
I hope this will help to you.
http://www.aspfree.com/c/a/ c-sharp / 5-way-to-parse-xml-in-c / [ ^ ]
阅读本文。希望如此会有所帮助。
谢谢
http://www.aspfree.com/c/a/c-sharp/5-ways-to-parse-xml-in-c/[^]
Read this.Hope this will help.
Thanks
这篇关于我对我的网络应用程序有疑问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!