How to use BulletedList display mode as HyperLink in asp.net

BulletedList DisplayMode HyperLink
BulletedList is an asp.net list web server control. BulletedList items are formatted with bullets. BulletedList DisplayMode specify the display behavior of the item contents. BulletedListDisplayMode enumeration have three possible values those are Text, LinkButton and HyperLink.

BulletedList DisplayMode HyperLink value allow developers to display list item content as hyperlinks. When user clicked, a hyperlink navigates to a url. each ListItem Value property specify the URL that a hyperlink navigates to when DisplayMode is HyperLink. Value property set the target url of hyperlink.

BulletedList Target property get or set the target window or frame in which to display the web page content that is linked when a hyperlink is clicked in BulletedList. Target property have the following possible values, they are _blank, _parent, _search, _self and _top.

The following c# example code demonstrate us how can we use BulletedList DisplayMode as HyperLink in asp.net.
BulletedListDisplayModeHyperLink.aspx

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

<!DOCTYPE html>

<script runat="server">
    
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>How to use BulletedList display mode (DisplayMode) as HyperLink</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Navy">BulletedList: DisplayMode HyperLink</h2>
        <asp:Label 
             ID="Label1"
             runat="server"
             Font-Bold="true"
             ForeColor="DarkMagenta"
             Text="asp.net controls"
             >
        </asp:Label>
        <asp:BulletedList 
             ID="BulletedList1"
             runat="server"
             Width="275"
             BorderColor="DarkMagenta"
             BorderWidth="2"
             DisplayMode="HyperLink"
             >
             <asp:ListItem Value="~/Control.aspx?Name=XML">XML</asp:ListItem>
             <asp:ListItem Value="~/Control.aspx?Name=DataList">DataList</asp:ListItem>
             <asp:ListItem Value="~/Control.aspx?Name=SqlDataSource">SqlDataSource</asp:ListItem>
             <asp:ListItem Value="~/Control.aspx?Name=SiteMapPath">SiteMapPath</asp:ListItem>
             <asp:ListItem Value="~/Control.aspx?Name=TreeView">TreeView</asp:ListItem>
        </asp:BulletedList>
    </div>
    </form>
</body>
</html>
Control.aspx

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

<!DOCTYPE html>

<script runat="server">
    protected void Page_Load(object sender, System.EventArgs e)
    {
        Label1.Text = "Control: " + Request.QueryString["Name"];
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>BulletedList: DisplayMode HyperLink</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Green">Welcome Control Page</h2>
        <asp:Label 
             ID="Label1"
             runat="server"
             Font-Bold="true"
             ForeColor="Crimson"
             Font-Size="Large"
             >
        </asp:Label>
    </div>
    </form>
</body>
</html>
Related asp.net examples