HomeAboutWeb DesignGraphicDesignPresentationContact

ASP Training 101

If Then Statements, Conditional Logic : Webitcorp If Then 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-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 & "!!!")
End If

If (gpa >= 80) and (gpa <= 90) Then
letterGrade = "B"
rtext="Your almost there, you got a "

Response.Write(rtext & " " & letterGrade)
End If

If (gpa >= 70) and (gpa <= 79) Then
letterGrade = "C"
rtext="You have to study, your almost there, you got a "

Response.Write(rtext & " " & letterGrade)
End If

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

Response.Write(rtext & " " & letterGrade)
End If

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

Response.Write(rtext & " " & letterGrade)
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