开发者

Deserialization fails

this is my code

            DropDownList1.Items.Add(new ListItem(" Prueba1"));
            DropDownList2.Items.Add(new ListItem(" Prueba1"));

//string[] filePaths = Directory.GetFiles(@"\\hmfsw\web\DTCWIN107\MYSITE.com\public_html\post\");

// Make a reference to a directory.
            DirectoryInfo di = new DirectoryInfo(@"\\hmfsw\web\DTCWIN107\MYSITE.com\public_html\post\");
            string path = @"\\hmfsw\web\DTCWIN107\MYSITE.com\public_html\linker\linker.xml";

// Get a reference to each file in that directory.
            FileInfo[] fiArr = di.GetFiles();

 // Display the names of the files.
            foreach (FileInfo fri in fiArr)DropDownList1.Items.Add(new ListItem(fri.Name));


            System.Xml.Serialization.XmlSerializer serializer =
            new System.Xml.Serialization.XmlSerializer(typeof(selector));
            System.IO.TextReader reader =
            new System.IO.StreamReader(path);
            selector s = (selector)serializer.Deserialize(reader);
            reader.Close();

OKay, The first thing is that the dropdownlist daes not update with prueba1 and prueba2

Bu开发者_如何学Got the dropdownlist do update with info of the folder...

And the second thiing is that the serializer.Deserialize daes nothing. The dropdownlist is not been load with the xml ...

Could you plz help me?

Thanks


I don't see any association between Dropdownlist and the selector.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜