Using an XML file as a data source to <asp: controls

  • Thread starter Thread starter AnandaSim
  • Start date Start date
A

AnandaSim

Hi All,

I'd like to use a static XML file as a source of data to any of the
<asp: list controls.

I have produced the .xml file, inferred a schema - .xsd, generated a
dataset .vb. How do I complete the process and use the dataset in a
vb.net asp.net file? I've been having a peek at the code that VS 2003
generates for creating an ADO.NET but there but am so far none the
wiser.

Or do I just have to stream read the xml file and fill list controls
that way?

Thanks

Ananda
 
If you have filled the dataset properly, just set the datasource of your list
control:
myListControl.DataSource = myDataSet;
myListControl.DataBind();

Rgs,
Kostadin Kostov
 
Yes, that is what I want to achieve, but how does main.aspx refer to
and load mydata.xml? I can see that the mydata.vb (generated from
mydata.xsd which in turn is generated from mydata.xml) has routines but
how does main.aspx know to call those routines?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top