ASP.NET BulletedList FirstBulletNumber Property
ASP.NET BulletedList FirstBulletNumber Property
The FirstBulletNumber property is used to get or set the starting number of the bullet points in a BulletedList control.
Syntax
public int FirstBulletNumber { get; set; }
Property Value
An integer value representing the first bullet point number in the list. The default value is 1.
Example
This example demonstrates how to set the starting number of bullets in a BulletedList control using the FirstBulletNumber property.
<%@ Page Language="C#" %>
<html>
<body>
<form runat="server">
<asp:BulletedList ID="BulletedList1" runat="server"
BulletStyle="NumberCircle"
FirstBulletNumber="5"
DisplayMode="List">
<asp:ListItem Text="Item 1" />
<asp:ListItem Text="Item 2" />
<asp:ListItem Text="Item 3" />
</asp:BulletedList>
</form>
</body>
</html>
In this example, the BulletedList will display bullet points starting from number 5 instead of 1.
Notes
- This property only affects the display order of bullet numbers and does not change the actual list items.
- If
FirstBulletNumberis set to a negative value, it will be ignored and the default value (1) will be used. - Valid values are integers greater than or equal to 1.
YouTip