What is BulletedList Control in Share Point. Give an example?

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);

}

}

}


By:harry
Date:2029-12-08 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related ASP.NET SUB Links

ASP.NET SUB interview questions and answers for experienced and fresher