Click here to Skip to main content
15,890,741 members
Home / Discussions / C#
   

C#

 
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 
QuestionEnterprise logging library by Microsoft. Pin
Charith Jayasundara25-Jul-06 8:27
Charith Jayasundara25-Jul-06 8:27 
AnswerRe: Enterprise logging library by Microsoft. Pin
led mike25-Jul-06 9:33
led mike25-Jul-06 9:33 
QuestionHow to create a "reference" to an object? Pin
Kuang Cao25-Jul-06 8:20
Kuang Cao25-Jul-06 8:20 
AnswerRe: How to create a &quot;reference&quot; to an object? Pin
Guffa25-Jul-06 8:36
Guffa25-Jul-06 8:36 
GeneralRe: How to create a &quot;reference&quot; to an object? Pin
Kuang Cao25-Jul-06 8:39
Kuang Cao25-Jul-06 8:39 
QuestionNeed unique text in textboxes Pin
kornstyle25-Jul-06 8:19
kornstyle25-Jul-06 8:19 
AnswerRe: Need unique text in textboxes Pin
stancrm25-Jul-06 8:37
stancrm25-Jul-06 8:37 

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.