using { and } in ASP ???

Results 1 to 4 of 4

Thread: using { and } in ASP ???

  1. #1
    Wouter de Jong Guest

    Default using { and } in ASP ???

    I&#039ve been using PHP for quite a while, and there you (can) use :<BR><BR>if(somestuff) {<BR>some code<BR>}<BR>elseif(other stuff) {<BR>some code2<BR>if(again other stuff) {<BR>brb }<BR>else {<BR>re }<BR>some done stuff }<BR><BR>Do you see the extra &#039if&#039 in an elseif ??? Howto do something similar in ASP ??? Can I use { and } too ??? [JavaScript allows it, so why wouldn&#039t ASP allow it]<BR><BR>Or if not, could someone give me an example of how to write &#039exact&#039 above code in ASP ???<BR><BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default RE: using { and } in ASP ???

    If by ASP you mean VBScript, you can say:<BR>If (Something) Then<BR> Do something<BR>ElseIf (Something) Then<BR> Do something<BR> If (Something) Then<BR> Do something<BR> End If<BR>End If<BR><BR>

  3. #3
    Rob Guest

    Default RE: using { and } in ASP ???

    Wouter:<BR><BR>Remember ASP is a technology, not a language.<BR>How you write it depends on the language you use.<BR>I would suggest you use vbscript for your ASP.<BR>It is native to asp and you will not be confusing it<BR>with client side javascript.<BR><BR>If someStuff then<BR>do this<BR>Elseif somestuff then<BR>dot his<BR>Else<BR>do this<BR>End If<BR><BR>No brackets required.<BR><BR><BR>Rob<BR><BR><BR>

  4. #4
    dhasza Guest

    Default RE: using { and } in ASP ???

    I can&#039t tell for sure what you want but the following may be it.<BR><BR>if(somestuff) {<BR> some code <BR> }<BR>else if(other stuff) {<BR> some code2<BR> if(again other stuff) {<BR> brb<BR> }<BR> }<BR>else {<BR> re<BR> }<BR><BR> <BR> <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts