How to Add a BulletedList to a PlaceHolder Control in asp.net Programmatically using C#

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. Click ToolBox-> Double Click on PlaceHolder(or drag and drop PlaceHolder on Design view)->

ToolBox-> Double Click on Button->Right click on Button->Select Properties->Change Text Properties to "Add Controls to PlaceHolder"-> Your Design Window should look like this
PlaceHolder Control













 3.Double click on Button to get the code behind(or Right click on Button->select Properties->Click Events->Double Click on Click Events)->Now write this code
 4.Click F5 to run your project->OK    
Add a BulletedList Control to a PlaceHolder
After Running the Project






















Add a BulletedList Control to a PlaceHolder Programmatically
When Clicking the Button BulletedList are shown on PlaceHolder

No comments:

Post a Comment