How to Use a Checkbox in Asp.Net 2.0
- 1). Click the Windows "Start" button and select "All Programs." Click "Microsoft .NET Framework," then click "Visual Studio." Open your Web project after the software loads.
- 2). Double-click the Web form in Solution Explorer to load the form. Drag and drop a "CheckBox" control from the toolbox to the Web form. Visual Studio draws the check box on the form. Drag and drop as many check boxes as you want to use on your form.
- 3). Click the check boxes to activate the control and display the control's property panel. Select "True" in the "AutoPostBack" property if you want to process the input from the user when the user checks the box. This means that when the user checks the box, you can process data without waiting for any other form input.
- 4). Double-click the check boxes to load the code in the ASP editor. You write the code for the check box processing in the window. For instance, the following code displays the checked box to the user:
Response.Write ("You chose " + checkbox1.Checked.Text);
Source...