Introduction:
Here I will explain BulletListin ASP.NET.
Discription
The BulletedList control creates a list in bullet format.Each item in a BulletedList control is defined by a ListItem element!The ListControl control covers all the base functions for list controls. The properties above applies to the BulletedList control.
Example
<%@ 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">
protected void
BulletedList1_Click(object sender,
System.Web.UI.WebControls.BulletedListEventArgs e)
{
Label1.Text = "You Choose:
" + BulletedList1.Items[e.Index].Text;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>BulletedList example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color: Navy">
BulletedList: DisplayMode
LinkButton</h2>
<asp:label id="Label1" runat="server" font-bold="true" forecolor="Crimson" font-size="Large">
</asp:label>
<br />
<br />
<asp:label id="Label2" runat="server" font-bold="true" forecolor="DodgerBlue" text="asp.net controls">
</asp:label>
<asp:bulletedlist id="BulletedList1" runat="server" width="275" bordercolor="DarkBlue"
borderwidth="2" displaymode="LinkButton" onclick="BulletedList1_Click">
<asp:ListItem>ListView</asp:ListItem>
<asp:ListItem>FormView</asp:ListItem>
<asp:ListItem>LinqDataSource</asp:ListItem>
<asp:ListItem>XmlDataSource</asp:ListItem>
<asp:ListItem>RegularExpressionValidator</asp:ListItem>
</asp:bulletedlist>
</div>
</form>
</body>
</html>
|
0 comments :
Post a Comment