Closed Thread Icon

Topic awaiting preservation: ASP If - Then Statements???? (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=12784" title="Pages that link to Topic awaiting preservation: ASP If - Then Statements???? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: ASP If - Then Statements???? <span class="small">(Page 1 of 1)</span>\

 
ink_e
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

posted posted 06-13-2003 23:37

In ASP can you have an IF satement start in the middle of another IF statement. Here is an example:

If (Request.Form("opiStation")) > "" Then
strBody = strBody & "<br><b>OPI Station: </b>" & Request.Form("opiStation")
If (Request.Form("opiStationAdd")) > "" Then
strBody = strBody & "<br>     <b>ADD to Operators Group: </b>" & Request.Form("opiStationAdd")
Else strBody = strBody & "<br>     <b>ADD to Operators Group: </b>" & "No"
End If
Else strBody = strBody & "<br><b>OPI Station: </b>" & "No"
End If

They are tabed differently than above. Lemme know if this will work????


[This message has been edited by ink_e (edited 06-13-2003).]

ink_e
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

posted posted 06-13-2003 23:49

Never Mind....posed and tested the page and it works perfect. Thanx

quisja
Paranoid (IV) Inmate

From: everywhere
Insane since: Jun 2002

posted posted 06-14-2003 21:11

If you're going to be nesting IF statements like that, then it's a very good idea to indent the parts between the IF and ENDIF for each statement. Makes you code easier to look at and easier to spot problems in.

« BackwardsOnwards »

Show Forum Drop Down Menu