Dynamically populating a BulletedList server control : BulletedList « ASP.net Controls « ASP.NET Tutorial






<%@ Page Language="C#" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>BulletedList Server Control</title>
</head>
<body>
    <form id="form1" runat="server">
       <asp:BulletedList ID="BulletedList1" 
                         Runat="server" 
                         DataSourceID="XmlDataSource1" 
                         DataTextField="Title">
       </asp:BulletedList>
       <asp:XmlDataSource ID="XmlDataSource1" 
                          Runat="server" 
                          DataFile="Data.xml" 
                          XPath="FilmChoices/Film">
       </asp:XmlDataSource>
   </form>
</body>
</html>

File: Data.xml

<?xml version="1.0" encoding="utf-8"?>
<FilmChoices>
  <Film
    Title="title 1"
    Year="1977"
    Director="A" />
  <Film
    Title="title 2"
    Year="1978"
    Director="B" />
  <Film
    Title="Title 3"
    Year="1962"
    Director="D" />
</FilmChoices>








3.6.BulletedList
3.6.1.Fill all asp:BulletedList style constant to asp:BulletedList, and click action (C#)
3.6.2.Add value to asp:BulletedList in a for loop (VB.net)
3.6.3.Add ListItem to BulletedList
3.6.4.Dynamically populating a BulletedList server control
3.6.5.BulletedList with DynamicImage
3.6.6.DisplayMode of BulletedList