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

 PlaceHolder Control is used like a container in which we can add other controls.It has no visual output.
The Placeholder does not render any tags for itself, so it is great for grouping content without the overhead of outer HTML tags.

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













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
After Running the project
















After clicking the Button the calender is shown on PlaceHolder

No comments:

Post a Comment