Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: problem with if statement


Message #1 by "Eric Lake" <elake@l...> on Thu, 7 Mar 2002 19:25:14
I'm trying to execute an IF statement.

If I copy what's in the book IE:

If varownerlen< 1 then Response.Write(varowner)

then Ultradev errors telling me I need a paren after the IF.
Message #2 by "Jenifer Mundstock" <jenifer@s...> on Thu, 7 Mar 2002 13:44:26 -0600
In UltraDev, you have to change it to:



If varownerlen < 1 then Response.Write varowner



Remove the parenthesis from the varowner variable.  Only add the parenthesis

if you have a combination of things to display like:  response.write("the

varowner variable = " & varowner)



Jenifer









----- Original Message -----

From: "Eric Lake" <elake@l...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Thursday, March 07, 2002 7:25 PM

Subject: [asp_web_howto] problem with if statement





> I'm trying to execute an IF statement.

> If I copy what's in the book IE:

> If varownerlen< 1 then Response.Write(varowner)

> then Ultradev errors telling me I need a paren after the IF.




$subst('Email.Unsub').

>



Message #3 by Naresh Bobade <nareshbobade@y...> on Thu, 7 Mar 2002 11:40:18 -0800 (PST)
Eric if u r trying to compare the length of the

varowner, the code is -



If Len(varowner) < 1 Then

  Response.Write(varowner) ' you'd actually print a

error message as the length of varowner is <1

End if



'Following code prints the varowner value if it's

length is > 1 else displays error

If Len(varowner) > 1 Then

  Response.Write varowner 

Else

  Response.Write "length error"

End if

--- Eric Lake <elake@l...> wrote:

> I'm trying to execute an IF statement.

> If I copy what's in the book IE:

> If varownerlen< 1 then Response.Write(varowner)

> then Ultradev errors telling me I need a paren after

> the IF.





$subst('Email.Unsub').





__________________________________________________

Do You Yahoo!?

Try FREE Yahoo! Mail - the world's greatest free email!

http://mail.yahoo.com/


  Return to Index