Showing posts with label else. Show all posts
Showing posts with label else. Show all posts

Tuesday, 19 March 2013

ASP: conditional statements with If...Then...Else...ElseIf

   


In ASP we can use conditional statements in different ways. The basic syntax we are used to, is If ... Then ... Else ... End, however we will see that there are some interesting things about it.

First of all let's consider a simple conditional statement in ASP. As you already know, we do not use any brackets or parenthesis. A basic example could be:
<%
Dim numVar
numVar = 5
If numVar = 5 then
  response.write("The variable numVar is 5")
End if
%>