Hello, i'm a beginner and i'm creating a guestbook in asp.net with XML.
i have the following:
my aspx page:
Name: <%#DataBinder.Eval(Container.DataItem, "name")%><br />
E-mail: <a href="mailto:<%# DataBinder.Eval(Container.DataItem, "email") %>"><%# DataBinder.Eval(Container.DataItem, "email") %></a><br />
Location: <%# DataBinder.Eval(Container.DataItem, "location") %><br />
Date: <%# DataBinder.Eval(Container.DataItem, "date") %><br />
<i><%# DataBinder.Eval(Container.DataItem, "entry_Text") %></i>
my code page:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim myXmlReader As XmlTextReader = New XmlTextReader(Server.MapPath("Guestbook.xml"))
Dim mydataset As DataSet = New DataSet
mydataset.ReadXml(myXmlReader)
myXmlReader.Close()
Guestbook.DataSource = mydataset.Tables
Guestbook.DataBind()
End Sub
my xml looks like this:
<guestbook>
<entry name="xxx" email="xxx" location="xxx" date="xxx"></entry>
</guestbook>