Hi Guys,
I've been working on a little something where details get put into an XML File and then squirted into another form which has been working fine.
I've now added another section to the XML file to hold the Company Name and it gets written to the XML without a problem but when trying to populate the text box on another form with the Company Name value from the XML file it does not work! There is no error either which is annoying.
The Code I'm currently using to try and get the variable is:
private void Send_Click(object sender, EventArgs e)
{
if (File.Exists(@"C:\Timewade\Quickticket\Person.xml"))
{
smtpDetails = new XmlDocument();
smtpDetails.Load(PATH);
root = smtpDetails.DocumentElement;
compName.Text = root.GetElementsByTagName("Company_Name")[0].InnerText;
When running the code in debug there is no error. Text box is still blank and does not error when entering,deleting free text from it.
any help would be great!
Many thanks.
Mark.