Solved

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

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

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 74

Expert Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Trouble parsing soap xml result 3 27
Tabcontrol Caption? 1 24
c# code 19 59
Open a word document 23 13
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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, …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now