How to load xml file in App_Data folder using ASP.NET

Hello,

My windows app is using the following code to load my xml file located in the application’s path. I’m now converting to a web version using ASP.NET. How do I modify the code below to load my xml files which are located in the App_Data folder?
Dim MyDoc As XDocument = XDocument.Load(Application.StartupPath & "/Donor.xml")

Thanks,

Victor
vcharlesAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
käµfm³d 👽Connect With a Mentor Commented:
I believe it would be along the lines of:

Dim MyDoc As XDocument = XDocument.Load(Server.MapPath("~/App_Data/Donor.xml"))

Open in new window

0
 
vcharlesAuthor Commented:
Thank You.
0
 
käµfm³d 👽Commented:
NP. Glad to help  = )
0
All Courses

From novice to tech pro — start learning today.