Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: BackgroundWorker, delegates, and exceptions? Pin
Nathan Holt at EMOM29-Oct-07 9:28
Nathan Holt at EMOM29-Oct-07 9:28 
Questionprinting String problem Pin
netJP12L29-Oct-07 7:29
netJP12L29-Oct-07 7:29 
AnswerRe: printing String problem Pin
Ennis Ray Lynch, Jr.29-Oct-07 8:40
Ennis Ray Lynch, Jr.29-Oct-07 8:40 
GeneralRe: printing String problem Pin
netJP12L29-Oct-07 8:55
netJP12L29-Oct-07 8:55 
GeneralI really don't know Pin
Ennis Ray Lynch, Jr.29-Oct-07 9:13
Ennis Ray Lynch, Jr.29-Oct-07 9:13 
GeneralRe: I really don't know Pin
netJP12L29-Oct-07 9:58
netJP12L29-Oct-07 9:58 
GeneralRe: I really don't know Pin
Ennis Ray Lynch, Jr.29-Oct-07 10:18
Ennis Ray Lynch, Jr.29-Oct-07 10:18 
QuestionProblem with code after ShowDialog and XML add node Pin
Rapier50329-Oct-07 7:23
Rapier50329-Oct-07 7:23 
Hello,
The code below I have:-
static string filename;
static XmlDocument xmlDoc;

and open the XML file in the Form Load.

If I remove the :- if (testDialog.ShowDialog() == DialogResult.OK)
Line the XML addnode code works OK. With the ShowDialog() line in the XML node add code does not work. Why?

Also is there something I can check (return code?) to make sure each part of the add node lines of code has worked?

void Button1Click(object sender, EventArgs e)
{
NewForm testDialog = new NewForm();

if (testDialog.ShowDialog() == DialogResult.OK)
{
MessageBox.Show("Here");


XmlNode root = xmlDoc.DocumentElement;
XmlElement childNode = xmlDoc.CreateElement("ABCD");
XmlElement childNode2 =xmlDoc.CreateElement("Name");
XmlText textNode = xmlDoc.CreateTextNode("ABCD");

root.AppendChild(childNode);
childNode.AppendChild(childNode2);
childNode2.SetAttribute("Name", "Name");
childNode2.AppendChild(textNode);

xmlDoc.Save(filename);
MessageBox.Show("Here2");
}

testDialog.Dispose();

}

Thanks is Advance,
Rapier

AnswerRe: Problem with code after ShowDialog and XML add node Pin
Andrei Ungureanu29-Oct-07 22:38
Andrei Ungureanu29-Oct-07 22:38 
QuestionHow to make sure the string has only Alphabet and Numberic in it? Pin
Khoramdin29-Oct-07 7:04
Khoramdin29-Oct-07 7:04 
AnswerRe: How to make sure the string has only Alphabet and Numberic in it? Pin
Le centriste29-Oct-07 7:17
Le centriste29-Oct-07 7:17 
Questiontranslate own syntax to c# Pin
laserbaronen29-Oct-07 5:34
laserbaronen29-Oct-07 5:34 
AnswerRe: translate own syntax to c# Pin
Colin Angus Mackay29-Oct-07 5:37
Colin Angus Mackay29-Oct-07 5:37 
GeneralRe: translate own syntax to c# Pin
laserbaronen29-Oct-07 5:39
laserbaronen29-Oct-07 5:39 
GeneralRe: translate own syntax to c# Pin
Colin Angus Mackay29-Oct-07 6:07
Colin Angus Mackay29-Oct-07 6:07 
QuestionSystem.Drawing.Image from URL. Pin
Dio2229-Oct-07 4:52
Dio2229-Oct-07 4:52 
AnswerRe: System.Drawing.Image from URL. Pin
martin_hughes29-Oct-07 5:21
martin_hughes29-Oct-07 5:21 
QuestionChecking for well formed XML Pin
Ennis Ray Lynch, Jr.29-Oct-07 4:51
Ennis Ray Lynch, Jr.29-Oct-07 4:51 
AnswerRe: Checking for well formed XML Pin
martin_hughes29-Oct-07 5:27
martin_hughes29-Oct-07 5:27 
GeneralUnfortunately not Pin
Ennis Ray Lynch, Jr.29-Oct-07 5:56
Ennis Ray Lynch, Jr.29-Oct-07 5:56 
GeneralRe: Unfortunately not Pin
Pete O'Hanlon29-Oct-07 6:08
mvePete O'Hanlon29-Oct-07 6:08 
GeneralRe: Unfortunately not Pin
Ennis Ray Lynch, Jr.29-Oct-07 6:17
Ennis Ray Lynch, Jr.29-Oct-07 6:17 
GeneralRe: Unfortunately not Pin
J4amieC29-Oct-07 7:00
J4amieC29-Oct-07 7:00 
GeneralRe: Unfortunately not Pin
Ennis Ray Lynch, Jr.29-Oct-07 7:39
Ennis Ray Lynch, Jr.29-Oct-07 7:39 
GeneralRe: Unfortunately not Pin
J4amieC29-Oct-07 7:47
J4amieC29-Oct-07 7:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.