using System;
using System.Collections.Generic;
using System.Web.UI.WebControls;
public partial class ListControls : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
List<string> educationList = new List<string>();
educationList.Add("MBA");
educationList.Add("MCA");
educationList.Add("BE");
educationList.Add("B.Tech");
educationList.Add("B.Arch");
educationList.Add("PHD");
BulletedList1.DataSource = educationList;
BulletedList1.DataBind();
}
}
protected void Style_Command(object sender, CommandEventArgs e)
{
switch (e.CommandName)
{
case "Circle":
BulletedList1.BulletStyle = BulletStyle.Circle;
break;
case "Disc":
BulletedList1.BulletStyle = BulletStyle.Disc;
break;
case "Numbered":
BulletedList1.BulletStyle = BulletStyle.Numbered;
break;
case "Square":
BulletedList1.BulletStyle = BulletStyle.Square;
break;
case "LowerRoman":
BulletedList1.BulletStyle = BulletStyle.LowerRoman;
break;
case "UpperAlpha":
BulletedList1.BulletStyle = BulletStyle.UpperAlpha;
break;
}
}
}