mentioned above:
Speaking of repeater, the use of XML file read, not ADO, and paging there are many ways, such as with the PagedDataSource, or through the parameters of the data source write SQL statements to achieve.
Page:
<%@ Import Namespace="System.Data" %><Scriptrunat= "Server">protectedvoidPage_Load (Object O,eventargs e) {DataSet DS= NewDataSet (); Ds. READXML (HttpContext.Current.Server.MapPath ("\\XMLFile1.xml")); Rep1. DataSource=ds; Rep1. DataBind (); }</Script><HTML><Body> <Asp:repeaterID= "Rep1"runat= "Server"> <ItemTemplate> <P> <%#Container. ItemIndex+1 %>|<%#Eval("name") %>|<%#Eval("Job Title") %> | <%# (Convert.toboolean (Eval("Incumbency Status"))==true)? "Serving" : "Not in service" %> | <%#Convert. ToDateTime (Eval("Date of entry")). ToString ("YYYY-MM-DD") %> </P> </ItemTemplate> </Asp:repeater></Body></HTML>
XML file: (Xmlfile1.xml)
<?XML version= "1.0" encoding= "Utf-8"?><Department> <Employees> <name>Chen Xiao</name> <Job Title>Supervisor</Job Title> <Incumbency Status>True</Incumbency Status> </Employees> <Employees> <name>Chen Xiaoxan</name> <Job Title>Secretary</Job Title> <Incumbency Status>True</Incumbency Status> </Employees> <Employees> <name>Chen</name> <Job Title>Assistant</Job Title> <Incumbency Status>True</Incumbency Status> </Employees> <Employees> <name>Chen Xiao</name> <Job Title>Clerk</Job Title> <Incumbency Status>True</Incumbency Status> </Employees> <Employees> <name>Chen Xiaoliu</name> <Job Title>Clerk</Job Title> <Incumbency Status>True</Incumbency Status> </Employees> <Employees> <name>Chen Xiaoxi</name> <Job Title>Clerk</Job Title> <Incumbency Status>False</Incumbency Status> </Employees></Department>
". NET" Repeater controls simple data binding (with bool, date, ordinal)