What you want to see on DotNetFunda.com ?
Go to DotNetFunda.com
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 11845 |  Welcome, Guest!   Register  Login
Home > Tutorials > ASP.NET Tutorials > BulletedList

Silverlight Tutorials | Report a Bug in the Tutorial
Found interesting? Add this to:


asp:BulletedList control
BulletedList control is used to display the data in a list prefixed with bullet characters.
 
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.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented generally through style properites of <ul> tag, However it depends on BulletStyle property.

Following are some important properties that are very useful.
DisplayMode HyperLink/LinkButton/Text. Determines how to display the items.
FirstBulletNumber Sets a starting number for Bulleted list when BulletStyle is set to Numbering.
Items Gets the colleciton of the items in the list control.
BulletStyle Circle/CustomImage/Disc/LowerAlpha/LowerRoman/Numbered/Square/UpperAlpha/UpperRoman. Determines the style of the bullet.
AppendDataBoundItems Determines whether statically defined items should remain and shown when adding items dynamically.
DataTextField Name of the field to set as items text. Used when DisplayMode is Hyperlink or LinkButton.
DataValueField Name of the field to set as items value. Used when DisplayMode is Hyperlink or LinkButton.
BulletImageUrl Used to set the Bullet Image when BulletStyle is CustomImage.
DEMO : BulletList Show Source Code
Static BulletList Control, Bullet style is default
  • Item 1
  • Item 2
  • Item 3
Static BulletList Contorl, Bullet style is LowerAlpha
  1. Item 1
  2. Item 2
  3. Item 3

Static BulletList Control, DisplayMode is Hyperlink


Static BulletList Control, DisplayMode is LinkButton

Dynamic BulletList Control, BulletStyle is Square
  • Item Text 0
  • Item Text 1
  • Item Text 2
  • Item Text 3
Dynamic BulletList Control with DataBound, BulletStyle is Numbered
  1. Name 0
  2. Name 1
  3. Name 2
  4. Name 3
  5. Name 4
  6. Name 5
  7. Name 6
  8. Name 7
  9. Name 8
  10. Name 9
 

        // 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>
    
                    





About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/25/2013 12:27:46 AM