Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is  BulletedList Control in Share Point. Give an example?
Bullet style allow u choose the style of the element that precedes the item.here u can choose numbers, squares, or circles.here child items can be rendered as plain text, hyperlinks, or buttons.
This example uses a custom image that requires to be placed in a virtual directory on the server.
using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Microsoft.SharePoint.WebPartPages;
namespace LoisAndClark.WPLibrary
{
public class MyWP : WebPart
{
protected override void CreateChildControls
 {
BulletedList objBullist = new BulletedList();
objBullist.BulletStyle = BulletStyle.CustomImage;
objBullist.BulletImageUrl = @"/_layouts/images/rajesh.gif";
objBullist.Items.Add("First");
objBullist.Items.Add("Seciond");
objBullist.Items.Add("Third");
objBullist.Items.Add("Fourth");
this.Controls.Add(objBullist);
}
}
}