How To Add Items in CheckBoxList Programmatically

1.File-> New-> Website->  ASP.NET Web Site(Visual C#) -> Ok

(Now You will see a Default.aspx page. To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add)

2.ToolBox-> Double Click on Label->Right click on Label, Select Properties->Change Text Properties to "Select Your Prefered Languages:"
Double Click on CheckBoxList(or drag drop CheckBoxList to Design Window)->Right Click CheckBoxList->Select Properties->Click Events(Horizontal Arrow)->Double Click On Init Event to get Code Behind(Vertical arrow)->

CheckBoxList Event
 3.Write this code:

4.To run your project Click F5->Ok
CheckBoxList
Our Final CheckBoxList



No comments:

Post a Comment