Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If - Else syntax

Status
Not open for further replies.

donishere

Programmer
May 7, 2002
101
0
0
This may seem VERY trivial, but what's wrong with this If block?

Code:
If (strSearchType = "name") Then
	Response.Write "name"
Else If (strSearchType = "stateprov") Then
	Response.Write "stateprov"
End If

I get an "Expected 'End'" error.
 
Dear donishere

Please remove the space between Else IF.

If (strSearchType = "name") Then
Response.Write "name"
ElseIf (strSearchType = "stateprov") Then
Response.Write "stateprov"
End If

This might solve the problem.

Regards,
Rajesh
 
Try putting another end if at the end. You cannot have 2 if statements, even though they are embedded, with only one end if.

Good Luck!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top