Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

Wwwxxxapc, CAM::PDF::Renderer::TextF Fragen, adodb.recordset error '800a0cc1', php save mails as eml, WWWXXXAPC, sqlexpress database file auto-creation error, sqlexpress database file auto-creation error, dbf2mysql parameter, wwwxxxAPC, How to unsubscrube from dategen spam



#1: Changing output format of checkBoxList control

Posted on 2008-04-24 16:25:09 by Andy B

I have the following checkBoxList in a web page. I set the DataSource in the
code behind (shown below the control) to a Dictionary<string, string>
collection. When I run the page, I get some formatting in the control that I
want to change. For this example, I get the key/value pair of the dictionary
inside of [] ([key, value]). For example:

Page output:

[Words, Just testing this thing...]

I need to make custom formatting with html and stuff. How would I do that?


<asp:CheckBoxList ID="WordList" runat="server">



public partial class _default : System.Web.UI.Page {

Contract StockContract = new Contract();

protected void Page_Load(object sender, EventArgs e) {

StockContract.Dictionary = new ContractDictionary<string, string>();

StockContract.Dictionary.Add("Words", "Just testing this thing...");

WordList.DataSource = StockContract.Dictionary;




Report this message