我对我的网络应用程序有疑问 [英] i have doubt in my web application

查看:89
本文介绍了我对我的网络应用程序有疑问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从我的网络应用程序的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆