TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mrxs1999
NA
19
0
Settings.xml write / read ?
Sep 16 2004 8:07 AM
i want to save the value of a FolderBrowserDialog to the settings.xml file my current xml save code is as follows : private void WriteAppSetting( string strFilePath, string strKey, string strValue ) { XmlDocument xmlDoc = new XmlDocument(); XmlNode xmlSettingsNode; XmlElement xmlSettingsElement = xmlDoc.DocumentElement; xmlDoc.Load ( strFilePath ); xmlSettingsNode = xmlDoc.SelectSingleNode ( "/configuration/appSettings" ); for ( int nDex=0; nDex < xmlSettingsNode.ChildNodes.Count; nDex++ ) { if ( xmlSettingsNode.ChildNodes[nDex].Attributes["key"].Value.ToString() == strKey ) { xmlSettingsNode.ChildNodes[nDex].Attributes["value"].Value = strValue; break; } } xmlDoc.Save(strFilePath); } and my folderbrowse code is : private void button2_Click(object sender, System.EventArgs e) { System.Windows.Forms.FolderBrowserDialog fbd = new DialogResult result = fbd.ShowDialog(this); if( result == DialogResult.OK ) { textBox1.Text = fbd.SelectedPath; } } i need to add some code to this part : { textBox1.Text = fbd.SelectedPath; .......code here...... } but i am unsure ( being a newbie ;) ) can somebody help , thanks
Reply
Answers (
1
)
SMTP mailing
is it possible to convert vb script ( vbs ) to c# ?