cheching if user is online ~ ASP Coding Guide

Tuesday, February 13, 2007

cheching if user is online

<%If Response.IsClientConnected=true thenResponse.Write(”The user is still connected!”)elseResponse.Write(”The user is not connected!”)end if%>


Explanation by Line
1. Starts the ASP code block.
2. Here we start an if statement that says if the user is connected then the statement is true and it goes to line three, otherwise it goes to line 5.
3. It prints that the user is connected.
4. The else statement says; if the initial if statement was false then execute line 5, otherwise skip over it.
5. It prints that the user isnt connected if the if statement was false.
6. This tag closes the if statement.
7. This tag ends the ASP code block.

Hoped this helped

No comments: