The
bulleted list control creates bulleted lists or numbered lists. These controls
contain a collection of List Item objects that could be referred to through the
Items property of the control.
Basic
syntax of a bulleted list:
<asp:bulleted lists id="bulletedlist1" runat="server"></asp:bulleted lists>
Common
Properties of the Bulleted List:
Bullet Style:This property specifies the style and looks of the bullets
Repeat Direction:It specifies the direction in which the controls to be repeated. The values available are horizontal and vertical ,default is Vertical
Repeat Columns: It specifies the number of columns to use when repeating the controls,default is 0
You can change the Bullet Style property. It's support various format. Here a sample code.
Repeat Direction:It specifies the direction in which the controls to be repeated. The values available are horizontal and vertical ,default is Vertical
Repeat Columns: It specifies the number of columns to use when repeating the controls,default is 0
Sample for Bulleted List:
- <%@ Page Language="C#" %>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
- <script runat="server">
-
- </script>
-
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>BulletedList Control Example</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:BulletedList ID="BulletedList1" runat="server">
- <asp:ListItem>ColdFusion</asp:ListItem>
- <asp:ListItem>PHP</asp:ListItem>
- <asp:ListItem>Asp.Net</asp:ListItem>
- <asp:ListItem>JSP</asp:ListItem>
- </asp:BulletedList>
- </div>
- </form>
- </body>
- </html>
Change BulletStyle Property
You can change the Bullet Style property. It's support various format. Here a sample code.
- <form id="form1" runat="server">
- <div>
- <asp:BulletedList ID="BulletedList1" runat="server" BulletStyle="Numbered">
- <asp:ListItem>ColdFusion</asp:ListItem>
- <asp:ListItem>PHP</asp:ListItem>
- <asp:ListItem>Asp.Net</asp:ListItem>
- <asp:ListItem>JSP</asp:ListItem>
- </asp:BulletedList>
- </div>
- </form>
No comments:
Post a Comment