Hi,
I have an application as in the following,
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.XML" %>
<script runat="server">
Sub submit(ByVal sender As Object, ByVal e As EventArgs)
songNodesOut.Text = String.Empty
If Page.IsPostBack Then
mess.Text = "<p style='margin-left:-2em'>You selected <b>" & drop1.SelectedItem.Text & "</b></p>"
End If
Dim file As String = Context.Server.MapPath("alice_music_list2.xml")
Dim document As XmlDocument = New XmlDocument()
document.Load(file)
Dim songList As XmlNodeList
songList = document.SelectNodes("/music_songs/song[category='" & drop1.SelectedItem.Text & "']")
Dim song As XmlNode
For Each song In songList
Dim title As XmlNode = song.FirstChild
songNodesOut.Text &= "<p class='music'><b>Title:</b> " & title.InnerText & "<br/>"
Dim category As XmlNode = title.NextSibling
songNodesOut.Text &= "<b>Category:</b> " & category.InnerText & "<br />"
Dim album As XmlNode = category.NextSibling
Dim artist As XmlNode = album.NextSibling
songNodesOut.Text &= "<b>Artist:</b>" & artist.InnerText & "<br/>"
songNodesOut.Text &= "<b>Album:</b> " & album.InnerText & "<br />"
Next
End Sub
</script>
<html>
<head/>
<body>
<div id="main">
<form id="Form1" runat="server">
<asp:DropDownList id="drop1" runat="server">
<asp:ListItem>Blues</asp:ListItem>
<asp:ListItem>Light Rock</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Button1" Text="Submit" OnClick="submit" runat="server"/>
<asp:Label id="songNodesOut" runat="server" />
</form>
</div>
</body>
</html>
The application works, but I would like to have 10 results per page. How easily can this be done? I don't want to use data view or grid view like most of the examples talk about, I would like to do this in the fashion that looks like what I have now, only not so many entries in a whole page.
Thanks for your help.