G
Guest
Hi all,
I want to create a method that does the following:
1) Programmatically instantiate a new XmlDataSource control
2) For each file in a named directory, make a "FileSystemItem" element
3) On each FileSystemItem Element, make two child nodes, one with the file
name, one with the file size. ie.
<filesystemitems>
<filesystemitem>
<filename> file1.jpg</filename>
<filesize>48935835</filesize>
</filesystemitem>
<filesystemitem>
I'll bind the resultant XmlDataSource to various controls.
Can someone suggest generally the syntax I want? I know how to loop over
directory items via foreach, but a quick look over MSDN did not suggest how
to instantiate the XmlDataSource control or any kind of .Add method I could
use to populate it.
Thanks!
-KF
I want to create a method that does the following:
1) Programmatically instantiate a new XmlDataSource control
2) For each file in a named directory, make a "FileSystemItem" element
3) On each FileSystemItem Element, make two child nodes, one with the file
name, one with the file size. ie.
<filesystemitems>
<filesystemitem>
<filename> file1.jpg</filename>
<filesize>48935835</filesize>
</filesystemitem>
<filesystemitem>
I'll bind the resultant XmlDataSource to various controls.
Can someone suggest generally the syntax I want? I know how to loop over
directory items via foreach, but a quick look over MSDN did not suggest how
to instantiate the XmlDataSource control or any kind of .Add method I could
use to populate it.
Thanks!
-KF