ASP Net Controls ASP.Net Tutorial

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
    Inherits="BulletedListDynamicImageTest" %>



    BulletedList Dynamic Image Test


    
        

            

Simple Bulleted List


            Select a bulleted list style
            
                Circle
                Disc
                LowerAlpha
                LowerRoman
                Numbered
                Square
                UpperAlpha
                UpperRoman
                CustomImage
            
            
                Item 1
                Item 2
                Item 3
            
        

    


File: Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class BulletedListDynamicImageTest : System.Web.UI.Page
{
  protected void drpStyles_SelectedIndexChanged(object sender, EventArgs e)
  {
    string sBullet = drpStyles.SelectedItem.Text;
    BulletStyle bs = (BulletStyle)Enum.Parse(typeof(BulletStyle), sBullet, true);
    blItems.BulletStyle = bs;
    if (bs == BulletStyle.CustomImage){
      blItems.BulletImageUrl = "images/bulletPlus.gif";
      }
  }
}