home

Asp.net If Else Tutorial


Conditional Stements are used when we want to perform an action based on a condition. For instance, we can say it its rainting stay at home else lets go out. Example is below
One Condition:

If  condition Then

    Execution…

End If

Two Conditions:

If  condition Then

    Execution…

Else

    Execution…

End If

Note: else will always mean the opposite to if

More than Two Conditions:

If  condition Then

    Execution…

Else If condition Then

    Execution…

Else

    Execution…

End If

 

<%
            Dim age as integer = 25
           
            if age = 25
                        response.Write("value of age is 25")
            else
                        response.Write("Do you know the value of age?")
            end if
           
%>


Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

all rights reseverd by Cramerz.com©. web design london by dotPeak. hosting by HostBay
all contents on cramerz are the property of Cramerz.com