Solved

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

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

679 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