Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-09-09
3
Medium Priority
?
518 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:vcharles
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 36511540
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
 

Author Closing Comment

by:vcharles
ID: 36512341
Thank You.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36512655
NP. Glad to help  = )
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question