Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
AnswerRe: how can I get the original properties of my form back? Pin
Christian Graus25-Jul-06 20:39
protectorChristian Graus25-Jul-06 20:39 
AnswerRe: how can I get the original properties of my form back? Pin
Martin#25-Jul-06 20:41
Martin#25-Jul-06 20:41 
QuestionProblem in Using Range Validator Pin
ChennaiBabu25-Jul-06 19:36
ChennaiBabu25-Jul-06 19:36 
QuestionCrystal Reports Pin
krieg3825-Jul-06 19:23
krieg3825-Jul-06 19:23 
AnswerRe: Crystal Reports [modified] Pin
krieg3825-Jul-06 19:49
krieg3825-Jul-06 19:49 
GeneralRe: Crystal Reports Pin
Glen Harvy22-Aug-06 22:48
Glen Harvy22-Aug-06 22:48 
QuestionHow to use EnableAutoDragDrop, Text DnD Pin
Mikzi25-Jul-06 18:02
Mikzi25-Jul-06 18:02 
Questioncreating auto folder path in c#.net Pin
ybasha25-Jul-06 17:26
ybasha25-Jul-06 17:26 
AnswerRe: creating auto folder path in c#.net Pin
Christian Graus25-Jul-06 17:53
protectorChristian Graus25-Jul-06 17:53 
QuestionProblem Window forms! [modified] Pin
taybalo25-Jul-06 15:37
taybalo25-Jul-06 15:37 
AnswerRe: Problem Window forms! Pin
krieg3825-Jul-06 19:25
krieg3825-Jul-06 19:25 
AnswerRe: Problem Window forms! Pin
stancrm25-Jul-06 20:15
stancrm25-Jul-06 20:15 
QuestionEnterprise Library 2.0 Pin
guroo1325-Jul-06 15:11
guroo1325-Jul-06 15:11 
AnswerRe: Enterprise Library 2.0 Pin
guroo1325-Jul-06 15:12
guroo1325-Jul-06 15:12 
QuestionWriting Xml from listView Pin
teejayem25-Jul-06 13:38
teejayem25-Jul-06 13:38 
I am trying to get each item from a listview and write it to an xml file. For instance lets say i have 2 items in the ListView: http://download.com/download1.zip & http://download.com/download2.zip. below is the code i have but it gives me an error: Unable to cast object of type 'System.Windows.Forms.ListViewItem' to type "System.String'.

XmlNode nodeDload = xmlDoc.DocumentElement;
XmlElement Dload = xmlDoc.CreateElement("Download");
XmlElement dataDload = xmlDoc.CreateElement(i.ToString());
XmlText textDload = xmlDoc.CreateTextNode("");

nodeDload.AppendChild(Dload);

foreach (string item in aUrlView.Items)
{
Dload.AppendChild(dataDload);
dataDload.AppendChild(textDload);
textDload.Value = item;
++i;
}

Example Below

<root>
<download>
<1>http://download.com/download1.zip</1>
<2>http://download.com/download2.zip</2>
</download>
</root>

Could someone help me out with this?
Thanks in advance

Don't be overcome by evil, but overcome evil with good
QuestionValidating data Pin
TheJudeDude25-Jul-06 11:09
TheJudeDude25-Jul-06 11:09 
AnswerRe: Validating data Pin
Ennis Ray Lynch, Jr.25-Jul-06 11:16
Ennis Ray Lynch, Jr.25-Jul-06 11:16 
GeneralRe: Validating data Pin
TheJudeDude25-Jul-06 11:48
TheJudeDude25-Jul-06 11:48 
QuestionReading xml Pin
teejayem25-Jul-06 10:50
teejayem25-Jul-06 10:50 
AnswerAlright Pin
Ennis Ray Lynch, Jr.25-Jul-06 10:57
Ennis Ray Lynch, Jr.25-Jul-06 10:57 
GeneralRe: Alright Pin
teejayem25-Jul-06 11:05
teejayem25-Jul-06 11:05 
GeneralRe: Alright Pin
Ennis Ray Lynch, Jr.25-Jul-06 11:13
Ennis Ray Lynch, Jr.25-Jul-06 11:13 
QuestionHow to find hyperlinks in .doc files Pin
bojanm725-Jul-06 10:44
bojanm725-Jul-06 10:44 
Questionhow to make a copy of .resx file Pin
iramg25-Jul-06 9:19
iramg25-Jul-06 9:19 
AnswerHold on I am about to move your cheese Pin
Ennis Ray Lynch, Jr.25-Jul-06 10:22
Ennis Ray Lynch, Jr.25-Jul-06 10:22 

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.