Do While Loop
Download
Report
Transcript Do While Loop
Follow up Loop Structure
Looping will logic executes a block of code
repeatedly until certain conditions are met or
true.
Do While Loop
Syntax of While loop:
Do while (condition)
~~~~~
~~~~~
Loop
Example program
Do loop
Syntax of do loop:
Do
~~~~~
~~~~~
Loop while(condition)
Note: Difference between do while and do loop is that---a.
Do while always check the condition first then execute the
statements.
b.
Do loop execute the statement first then it will check the
condition. It means in do loop statement will be executed at
least for one time.
Example Program
For Loop
Syntax of For Loop:
For counter var = starting_value to stop_value
~~~~~
~~~~~
Next
Example program with key word (step)
How you can print number / string in a reverse order.
Data Validation
Importance of data validity.
How to check the data validity by
using if-then-else.
Example program
Request Object
How Request.Form retrieve data from
Text Boxes.
Example Program
Session Method:
The Session used to maintain state only for
the duration of the user’s visit to your web sit.
When each new user comes to your site,
memory on the web server is allocated to
store session object for that user. This
memory is released if the user does not visit
your web site for a certain length of time. By
default this time period is 20 minutes.
Use of Session Objects
How
to create Session
How to assign time length
How to end session immediately
Store and retrieve Session variables.
Example Program of using session
variable.
Summery
The purpose of Session variable discussed
here because students need to use session
variable in their assignment.