Solved

Help with accessing data in subfolder of applicaion's folder

Posted on 2014-04-27
3
170 Views
Last Modified: 2014-04-27
Hi,

How do I modify the code below to access the xml file in the "Data" subfolder?

xmlPath3 = System.IO.Path.Combine(Application.StartupPath, "Receiver.xml")

The code above looks for the file in the Bin/Debug folder but the xml file is in the "Data" subfolder.


I tried the code below but it does not work:

xmlPath3 = System.IO.Path.Combine(Application.StartupPath + \Data\, "Receiver.xml")

Thanks,

Victor
0
Comment
Question by:vcharles
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 40025859
xmlPath3 = System.IO.Path.Combine(Application.StartupPath & "\Data\", "Receiver.xml")
0
 

Author Closing Comment

by:vcharles
ID: 40025928
Thank You.
0
 
LVL 26

Expert Comment

by:MacroShadow
ID: 40025941
You're welcome.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
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

20 Experts available now in Live!

Get 1:1 Help Now