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



How to Add Items in CheckBoxList in vs2010

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 CheckBoxList(or drag drop CheckBoxList to Design Window)-> click Arrow sign->Click Edit items->
CheckboxList Control
CheckBoxList

















3.Click Add(to add new item)->Change Text to your desired item name(if you select Selected to true then it will always remain selected)-> Ok
Add Item to CheckBoxList


































4.To Run your Project Click F5->Ok
Our Final CheckBoxList With Added Item
Our Final CheckBoxList With Added Item

How To Create a Website in Visual Studio 2010 And Adding a New Web Page

1.File->New->Click Website

Creating a Website in Visual Studio 2010
Creating a Website in Visual Studio 2010









2.(left side select visual c#) ASP.NET Web Site->ok
Adding a Web Form
Adding a Form











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

4.Select Web Form(you change your page name)->click Add
Adding Web Form
Adding New Web Form

5.Now You Will see Source View. To see source view and Design view simultaniously click Split.To see only Design View Click Design. Now You can Design your page as you like.


How to Add Items in DropDownList Programmatically

1.File->New->Click Website


2.(left side select visual c#) ASP.NET Web Site->ok

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

4.Select Web Form(you change your page name)->click Add

5.Click Design->From ToolBox Drag and Drop a Label to Design window->Right click on  label->select properties->(look for text property) change text property from label to "Select University".

 6. Toolbox->Drag and drop a DropDownList to Design window(or Double click on DropDownList) Beside label1.
 Your window Should look similar to this

7.Right Click DropDownList->Select Properties->Click Events(Shown Horizontal arrow)->Double Click on Init Event(or You can also click on Load Event).

8.Now Write This Code .


9.Click F5->Ok

How to Add Items in DropDownLoad List in ASP.NET

I believe that one image solves a lot of question.so i am trying to use more image so Beginners can understand my article easily.

1.File->New->Click Website
 

































































































































Creating a website



2.(left side select visual c#) ASP.NET Web Site->ok

How to change TextBox TextMode SingleLine to Password Programmatically

1.File->New->Website->(left side select visual c#) ASP.NET Web Site->ok

2.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

3. Click Design->From ToolBox Drag and Drop a Label to Design window->Right click on label->select properties->(look for text property) change text property from label to "User Name".

4.Toolbox->drag and drop a TextBox to Design window(or Double click on Textbox) Beside label1.


5.Again Add a label and a TextBox following step 3 and 4->Name this label text to "Password"

6.Toolbox->Double click on Button and place it like the image.

Your Design should look like this.

 7.Click F5->Ok
Before Clicking The Button

After Clicking The Button

How to Change Button width Programmatically

 1.File->New->Website->(left side select visual c#) ASP.NET Web Site->ok

2.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

3. Click Split(to see Design and code View simultaniously)->From ToolBox Drag and Drop a Label to Design window->Right click on label->select properties->(look for text property) change text property from label to "Button Width Example".

4.Drag and drop a button below label->Right click on Button->select properties->change text property from Button to "Width 300.Your window should look like this.

How to change Background color of label programmatically in ASP.NET

 1.File->New->Website->(left side select visual c#) ASP.NET Web Site->ok

2.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

3. Click Split(to see Design and code View simultaniously)->From ToolBox Drag and Drop a Label to Design window->Right click on label->select properties->(look for text property) change text property from label to "This text will change when i click the Button".

4.Drag and drop a button below label->Right click on Button->select properties->change text property from Button to "change back color.Your window should look like this.


How to Set or Change Label Text Programmatically in ASP.NET

1.File->New->Website->(left side select visual c#) ASP.NET Web Site->ok

2.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->Add(you can change the name,here i change it from Default2.aspx To LabelControl.aspx)


3.Click Split(to see Design and code View simultaniously)->From ToolBox Drag and Drop a Label to Design window->Right click on label->select properties->(look for text property) change text property from label to "This text will change when i click the Button".