File Path in XML
I'm creating a progam in C# that reads a file location at start up and displays the parent folders in a combo box. This file location may change in future. So I intend to keep this in an xml file and allow the user to change it when needed. But how do I go about it? I have not done any coding with xml yet. So, please help.
An XML file is nothing more that a specially formatted text file.
Have you worked with text files before?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
Not really! Could you help me out please?
Check out these following links
If you can provide more details as to the format of the file and the purpose of the app I might be able to help futher...what you have said is a bit vague and doesn't make a lot of sense to me!
Yes, I have worked. I came to know that the properties settings would do the job. But that too gives an error.
Originally Posted by Hack
I added 'ParentPath' in the Name field and "C:\Test" in the value field. But the error is 'Illegal characters in path.'
string path = Properties.Settings.Default.ParentPath.ToString();
DirectoryInfo di = new DirectoryInfo(path);
It sounds like you havent escaped the \
\ is a special character and as such needs to be escaped using another \
so use something like
string test = "C:\\test.txt"
string test = @"C:\test.txt"
Solved by removing the quotes.
Last Post: 08-23-2002, 05:35 PM
By Tomer Cagan in forum ASP.NET
Last Post: 07-24-2001, 10:01 AM
By Kelvin Teh in forum XML
Last Post: 02-16-2001, 11:09 AM
Last Post: 12-10-2000, 12:50 AM
By CHRISTOS STAVRINOU in forum VB Classic
Last Post: 11-16-2000, 05:58 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL