HomeAboutWeb DesignGraphicDesignPresentationContact

ASP Training 101

If Then Else Statements, Conditional Logic : Webitcorp If Then Else Statements
what is you number grade

Ohhh Boy, you got an F

The Code

<%Dim gpa, letterGrade, rtext, gpaf
pgaf = 0%>

If Then Statements <br />
what is you number grade
<form method="post" action="if-then-else-statements.asp"><input name="gpaf" type="text" /><input name="" type="submit" value="Submit" />

<%

gpa = Request.Form("gpaf")
If gpa >= 90 Then
letterGrade = "A"
rtext="YOU GOT AN"
Response.Write(rtext & " " & letterGrade & "!!!")
Else
If gpa >= 80 Then
letterGrade = "B"
rtext="Your almost there, you got a "

Response.Write(rtext & " " & letterGrade)
Else
If gpa >= 70 Then
letterGrade = "C"
rtext="You have to study, your almost there, you got a "

Response.Write(rtext & " " & letterGrade)
Else

If gpa >= 60 Then
letterGrade = "D"
rtext="You have to study, your almost there, you got a "

Response.Write(rtext & " " & letterGrade)
Else

If gpa <= 59 Then
letterGrade = "F"
rtext="Ohhh Boy, you got an "

Response.Write(rtext & " " & letterGrade)
End If
End If
End If
End If
End If
%></form>

 

Home | About | Web Design | Graphic Design | Presentations | Contact | Site Map | del.icio.us+del.icio.us

| Saint Lucie County, Florida | Rockland County, NY | Burgan County, NJ |


Port Saint Lucie Web Development , Graphic Design , Multimedia Presentations , and much more

Valid XHTML 1.0 Transitional

Copyright ©2007

Onenuttyweb.com