1. 1
HTML SERVER CONTROL -InputCheckbox (VB)
LAB WORK GUIDE
A Programme Under the compumitra Series
"Checkboxes are used for instances where a user may wish to select
multiple options, a sort of check all that apply question. ."
4. 4
INPUT CHECK BOX IN HTML CONTROLS –Go to Sample Source
Open source file by
typing
http://www.sunmitra.
com/cmaspnet/HTML
Controls/HTMLInputC
heckbox/HTMLInputC
heckbox.aspx address
here
5. 5
Copy this code
INPUT CHECK BOX IN HTML CONTROLS- Run/Copy Code and Create your own
Paste it on Notepad and
Save this Notepad with
<HtmlInputCheckbox.aspx>
name in Learner/<student-
id>/HTMLControls/HtmlInp
utCheckbox folder.
6. 6
INPUT CHECK BOX IN HTML CONTROLS- Run Your Own Code
For executing this Html file –
Write this Address on address bar.
http://Localhost/<StudentID>/HTMLControls/HTMLInputCheckbox/HTMLInputCheckbox.aspx
And after that, click go button.
Output On Browser
7. 7
Add the following code to return condition for
both checked before the else statement.
if blue.Checked=True then
p1.InnerHtml="You prefer both red! and blue!"
end if
Watch the effect now.
INPUT CHECK BOX IN HTML CONTROLS: Modification Trials
8. 8
Change Sub submit(Source As Object, e As
EventArgs) line to
protected void submit(Object sender,EventArgs
e)
Watch the compiler error output as
BC30205:End of statement expected
INPUT CHECK BOX IN HTML CONTROLS: Error Trials
9. 9
INPUT CHECK BOX IN HTML CONTROLS: Practice Exercise
Write a program which display three Checkboxes 'Red',
'Blue' and 'Green' and one Button 'Submit'. Now write
some conditions to display following output-
If Red and Blue Checkbox is selected the Output is-
You prefer Red and Blue.
If Red and Green Checkbox is selected the Output is-
You prefer Red and Green.
If Blue and Green Checkbox is selected the Output is-
You prefer Blue and Green.
If all the Checkboxes are selected or not and if only one
checkbox is selected the Output is-
Wrong Selection.
10. 10
INPUT CHECK BOX IN HTML CONTROLS: Learning Summary Review
Use of HTML Check Box Control.
Attributes of Check Box Control.
HTML Input Checkbox
Extra VB code with if endif
11. 11
INPUT CHECK BOX IN HTML CONTROLS: Bibliography
http://msdn.microsoft.com/en-
us/library/31d4thc6(v=VS.71).aspx
http://authors.aspalliance.com/aspxtreme/asp
net/syntax/htmlinputcheckboxcontrol.aspx
http://www.w3schools.com/aspnet/control_ht
mlinputcheckbox.asp
http://www.tizag.com/htmlT/htmlcheckboxes.
php
12. 12
Ask and guide me at
sunmitraeducation@gmail.com
Share this information with as
many people as possible.
Keep visiting www.sunmitra.com
for programme updates.