Solved

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

Posted on 2011-09-09
3
489 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 500 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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