Click here to Skip to main content
16,008,299 members
Home / Discussions / C#
   

C#

 
QuestionPassword Length Throws Error Pin
Richard Blythe9-Jul-07 18:47
Richard Blythe9-Jul-07 18:47 
QuestionC# Event logger Pin
Andre da Silva Carrilho9-Jul-07 7:19
Andre da Silva Carrilho9-Jul-07 7:19 
QuestionQuestion on Horizantal Scroller and Client Screen Resolution... Pin
Khoramdin9-Jul-07 6:56
Khoramdin9-Jul-07 6:56 
AnswerRe: Question on Horizantal Scroller and Client Screen Resolution... Pin
Luc Pattyn9-Jul-07 7:26
sitebuilderLuc Pattyn9-Jul-07 7:26 
QuestionWhat is the purpose of suspend and resume layout? i cant see it working Pin
sinosoidal9-Jul-07 5:52
sinosoidal9-Jul-07 5:52 
AnswerRe: What is the purpose of suspend and resume layout? i cant see it working Pin
Luc Pattyn9-Jul-07 6:38
sitebuilderLuc Pattyn9-Jul-07 6:38 
GeneralRe: What is the purpose of suspend and resume layout? i cant see it working Pin
Martin#9-Jul-07 8:53
Martin#9-Jul-07 8:53 
QuestionHelp with reading XML [modified] Pin
velkropie9-Jul-07 5:44
velkropie9-Jul-07 5:44 
Hello,

i would like to have a windows form combo box populated from an xml file,

here is the format of the xml file

<br />
//i had to add quotes to the tags to display, there is no quotes in real code..thanks<br />
"<"ITEMS">"<br />
"<"NAME">""<"/"NAME">"<br />
"<"URL">""<"/"URL>"<br />
"<"/"ITEMS">"<br />


i want to take these two items and assign them as variables

NewName;
NewUrl;

which i will then populate the combo box with...

and read them with this code
<br />
            // Declare a variable of type  XmlTextReader<br />
            //XmlTextReader xtr = null;<br />
            //// Declare a string that holds the name of the file<br />
            //string fileName = "ConboItems.xml";<br />
<br />
            //try<br />
            //{<br />
            //    // Initialize the XmlTextReader variable with the name of the file<br />
            //    xtr = new XmlTextReader(fileName);<br />
            //    xtr.WhitespaceHandling = WhitespaceHandling.None;<br />
<br />
            //    // Scan the XML file<br />
            //    while (xtr.Read())<br />
            //    {<br />
            //        // every time you find an element, find out what type it is<br />
            //        switch (xtr.NodeType)<br />
            //        {<br />
            //            case XmlNodeType.Text:<br />
            //                // If you find text, put it in the combo box' list            //              <br />
            //                this.comboChannels.Items.Add(xtr.Value);<br />
                            <br />
            //                break;<br />
            //        }<br />
            //    }<br />
<br />
            //    // For this example, select the first item                <br />
                 //  this.comboChannels.SelectedIndex = 0;<br />
            //}<br />
            //finally<br />
            //{<br />
            //    // Close the XmlTextReader<br />
            //    if (xtr != null)<br />
            //        xtr.Close();<br />
            //} 


-- modified at 15:46 Monday 9th July, 2007

The Devil Lives in all of us, It's up to you to let HIM/HER out!!!!!

AnswerRe: Help with reading XML Pin
Vikram A Punathambekar9-Jul-07 18:19
Vikram A Punathambekar9-Jul-07 18:19 
GeneralRe: Help with reading XML Pin
velkropie10-Jul-07 4:22
velkropie10-Jul-07 4:22 
GeneralRe: Help with reading XML Pin
Vikram A Punathambekar10-Jul-07 4:42
Vikram A Punathambekar10-Jul-07 4:42 
GeneralRe: Help with reading XML [modified] Pin
velkropie10-Jul-07 9:43
velkropie10-Jul-07 9:43 
QuestionExample DataGridView like Outlook... Pin
jsosa99-Jul-07 5:33
jsosa99-Jul-07 5:33 
AnswerRe: Example DataGridView like Outlook... Pin
velkropie11-Jul-07 11:40
velkropie11-Jul-07 11:40 
GeneralRe: Example DataGridView like Outlook... Pin
jsosa911-Jul-07 12:24
jsosa911-Jul-07 12:24 
GeneralRe: Example DataGridView like Outlook... Pin
velkropie13-Jul-07 10:53
velkropie13-Jul-07 10:53 
Questionunable to cast object of type 'X' to type 'X' Pin
joelbasson9-Jul-07 5:22
joelbasson9-Jul-07 5:22 
AnswerRe: unable to cast object of type 'X' to type 'X' Pin
Colin Angus Mackay9-Jul-07 5:47
Colin Angus Mackay9-Jul-07 5:47 
AnswerRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 6:02
Martin#9-Jul-07 6:02 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Colin Angus Mackay9-Jul-07 7:16
Colin Angus Mackay9-Jul-07 7:16 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
PIEBALDconsult9-Jul-07 8:25
mvePIEBALDconsult9-Jul-07 8:25 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Luc Pattyn9-Jul-07 8:35
sitebuilderLuc Pattyn9-Jul-07 8:35 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Martin#9-Jul-07 8:41
Martin#9-Jul-07 8:41 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
PIEBALDconsult9-Jul-07 13:48
mvePIEBALDconsult9-Jul-07 13:48 
GeneralRe: unable to cast object of type 'X' to type 'X' Pin
Luc Pattyn9-Jul-07 14:18
sitebuilderLuc Pattyn9-Jul-07 14:18 

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.