<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHeader" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderForTitleAndIntro" Runat="Server">
<asp:Label ID="lblError" runat="Server" SkinID="ErrorLabel"></asp:Label>
<table width="100%" cellpadding="2" cellspacing="0">
<tr valign="top" class="ArticleTitle">
<td style="padding-left:10px;" valign="middle">
asp:BulletedList control</td>
</tr>
<tr>
<td class="ArticleContents">
BulletedList control is used to display the data in a list prefixed with bullet characters.
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderForContents" Runat="Server">
<div class="ArticleContents">
BulletedList control is used to display the data in a list prefixed with bullet characters.
The item can be statically written or can be bound with the datasource.
When it is rendered on the page, it is implemented through <table> HTML tag.
<p>
Its properties like <span class="DemoCP">BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. </span>
are implemented generally through style properites of <ul> tag, However it depends on BulletStyle property.
</p>
Following are some important properties that are very useful.
<table width="100%" class="TutoPropPlaceHolder" border="1" cellpadding="2" cellspacing="1">
<tr>
<td class="DemoCP">DisplayMode</td>
<td>
HyperLink/LinkButton/Text. Determines how to display the items.
</td>
</tr>
<tr>
<td class="DemoCP">FirstBulletNumber</td>
<td>
Sets a starting number for Bulleted list when BulletStyle is set to Numbering.
</td>
</tr>
<tr>
<td class="DemoCP">Items</td>
<td>
Gets the colleciton of the items in the list control.
</td>
</tr>
<tr>
<td class="DemoCP">BulletStyle</td>
<td>
Circle/CustomImage/Disc/LowerAlpha/LowerRoman/Numbered/Square/UpperAlpha/UpperRoman. Determines the style of the bullet.
</td>
</tr>
<tr>
<td class="DemoCP">AppendDataBoundItems</td>
<td>
Determines whether statically defined items should remain and shown when adding items dynamically.
</td>
</tr>
<tr>
<td class="DemoCP">DataTextField</td>
<td>
Name of the field to set as items text. Used when DisplayMode is Hyperlink or LinkButton.
</td>
</tr>
<tr>
<td class="DemoCP">DataValueField</td>
<td>
Name of the field to set as items value. Used when DisplayMode is Hyperlink or LinkButton.
</td>
</tr>
<tr>
<td class="DemoCP">BulletImageUrl</td>
<td>
Used to set the Bullet Image when BulletStyle is CustomImage.
</td>
</tr>
</table>
<!-- START - Demo Section -->
<table class="DemoPlaceHolder" border="1" cellpadding="2" cellspacing="4">
<tr>
<td class="DemoTitle">
DEMO : BulletList
</td>
<td align="right">
<a class="DemoShowSource" href="../../misc/codeviewer/default.aspx?pagename=~/tutorials/controls/bulletlist.aspx" target="_blank">Show Source Code</a>
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td>
Static BulletList Control, Bullet style is default<br />
<asp:BulletedList ID="bulletStatic" runat="Server" BorderColor="Blue" BorderWidth="1">
<asp:ListItem Text="Item 1"></asp:ListItem>
<asp:ListItem Text="Item 2"></asp:ListItem>
<asp:ListItem Text="Item 3"></asp:ListItem>
</asp:BulletedList>
</td>
<td>
Static BulletList Contorl, Bullet style is LowerAlpha<br />
<asp:BulletedList ID="BulletedList1" runat="Server" BulletStyle="LowerAlpha">
<asp:ListItem Text="Item 1"></asp:ListItem>
<asp:ListItem Text="Item 2"></asp:ListItem>
<asp:ListItem Text="Item 3"></asp:ListItem>
</asp:BulletedList>
</td>
</tr>
<tr valign="Top">
<td>
<p>
Static BulletList Control, DisplayMode is Hyperlink
<asp:BulletedList ID="StaticBullet2" runat="Server" DisplayMode="HyperLink"
BulletStyle="CustomImage" BulletImageUrl="~/images/fundaIcon.gif">
<asp:ListItem Text="Button" Value="button.aspx"></asp:ListItem>
<asp:ListItem Text="Label" Value="Label.aspx"></asp:ListItem>
<asp:ListItem Text="Radio" Value="radio.aspx"></asp:ListItem>
</asp:BulletedList>
<br />
Static BulletList Control, DisplayMode is LinkButton
<asp:BulletedList ID="BulletedList2" runat="Server" DisplayMode="LinkButton">
<asp:ListItem Text="Button" Value="button.aspx"></asp:ListItem>
<asp:ListItem Text="Label" Value="Label.aspx"></asp:ListItem>
<asp:ListItem Text="Radio" Value="radio.aspx"></asp:ListItem>
</asp:BulletedList>
</p>
Dynamic BulletList Control, BulletStyle is Square<br />
<asp:BulletedList ID="BulletRunTime" runat="Server" BulletStyle="Square" DataTextField="Name" DataValueField="ID"></asp:BulletedList>
</td>
<td>
Dynamic BulletList Control with DataBound, BulletStyle is Numbered<br />
<asp:BulletedList ID="BulletDataBound" runat="Server" BulletStyle="Numbered" DataTextField="Name" DataValueField="ID"></asp:BulletedList>
</td>
</tr>
</table>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="2">
<pre>
// Static BulletedList Control, Bullet style is default<br />
<asp:BulletedList ID="BulletedList3" runat="Server" BorderColor="Blue" BorderWidth="1">
<asp:ListItem Text="Item 1"></asp:ListItem>
<asp:ListItem Text="Item 2"></asp:ListItem>
<asp:ListItem Text="Item 3"></asp:ListItem>
</asp:BulletedList>
// Static BulletList Contorl, Bullet style is LowerAlpha<br />
<asp:BulletedList ID="BulletedList4" runat="Server" BulletStyle="LowerAlpha">
<asp:ListItem Text="Item 1"></asp:ListItem>
<asp:ListItem Text="Item 2"></asp:ListItem>
<asp:ListItem Text="Item 3"></asp:ListItem>
</asp:BulletedList>
// Static BulletList Control, DisplayMode is Hyperlink
<asp:BulletedList ID="BulletedList5" runat="Server" DisplayMode="HyperLink"
BulletStyle="CustomImage" BulletImageUrl="~/images/fundaIcon.gif">
<asp:ListItem Text="Button" Value="button.aspx"></asp:ListItem>
<asp:ListItem Text="Label" Value="Label.aspx"></asp:ListItem>
<asp:ListItem Text="Radio" Value="radio.aspx"></asp:ListItem>
</asp:BulletedList>
// Static BulletList Control, DisplayMode is LinkButton
<asp:BulletedList ID="BulletedList6" runat="Server" DisplayMode="LinkButton">
<asp:ListItem Text="Button" Value="button.aspx"></asp:ListItem>
<asp:ListItem Text="Label" Value="Label.aspx"></asp:ListItem>
<asp:ListItem Text="Radio" Value="radio.aspx"></asp:ListItem>
</asp:BulletedList>
// Dynamic BulletList Control, BulletStyle is Square<br />
<asp:BulletedList ID="BulletedList7" runat="Server" BulletStyle="Square" DataTextField="Name" DataValueField="ID"></asp:BulletedList>
// Dynamic BulletList Control with DataBound, BulletStyle is Numbered<br />
<asp:BulletedList ID="BulletedList8" runat="Server" BulletStyle="Numbered" DataTextField="Name" DataValueField="ID"></asp:BulletedList>
</pre>
</td>
</tr>
</table>
<!-- END - Demo Section -->
</div>
<br />
<script language="javascript" type="text/javascript">
function GiveAlertToUser()
{
alert("Hi Dear, Client side method worked.");
}
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="PlaceHolderFooter" Runat="Server">
</asp:Content>
Go Top