|
|
 |
Re: FN-FORUM ASP code help
date posted 12th September 2002 16:44
Same thing happens with and without the brackets....
By the way, the Response.Writes and the RecordSet stuff is not the issue
here. As far as I can see, the two response writes at the top show nothing
surrounded by asterisks. Surely showing the len() of something should show
a number even if it is zero? Equally, as you go further down, the If
statement is checking the len() of the variable and finding it to be not
zero therefore outputting "hello" instead of "none" if it was zero. What I
don't understand is how when writing a variable to the screen and showing
that it is nothing, why doesn't the len function return 0?
Dave
----- Original Message -----
From: "Tam Stone" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Thursday, September 12, 2002 4:06 PM
Subject: Re: FN-FORUM ASP code help
You don't need the '(' for response.write should read
Response.Write "*" & len( trim( strAffiliateID)) & "*"
which will give you *ID* as output
>
>Program code:
>
>strAffiliateID = RecordSet.Fields("fldAffiliateID")
>Response.Write( "*" & len( trim( strAffiliateID)) & "*")
>Response.Write( "*" & strAffiliateID & "*")
>
>If len( trim( strAffiliateID)) = 0 Then
> Response.Write( "None")
>Else
> Response.Write( strAffiliateID & "hello")
>End If
>%>
>
>
>Output:
>
>****hello
>
>
>
>
>
>============================================================
>= Advanced web hosting solutions from Saffas. =
>= Unix, PHP, mySQL, SSL, Perl, Control Panel, 24/7 access. =
>= Why pay more for less? http://www.saffas.com =
>============================================================
>
>Sponsor the forum for as little as £1 at:
>
>http://www.freelancers.net/cgi/sponsor.cgi?action=show
>
>
>Advertise with Freelancers.net +Additions+
>
>http://www.freelancers.net/advert.php
>
>
>Freelancers and Freelance Jobs:
>http://www.freelancers.net
>
>Forum FAQs:
>http://freelancers.netrickery.com
>
>To unsubscribe please email:
[EMAIL REMOVED]
>
>If you have difficulties unsubscribing please email:
[EMAIL REMOVED]
>
>
============================================================
= Advanced web hosting solutions from Saffas. =
= Unix, PHP, mySQL, SSL, Perl, Control Panel, 24/7 access. =
= Why pay more for less? http://www.saffas.com =
============================================================
Sponsor the forum for as little as £1 at:
http://www.freelancers.net/cgi/sponsor.cgi?action=show
Advertise with Freelancers.net +Additions+
http://www.freelancers.net/advert.php
Freelancers and Freelance Jobs:
http://www.freelancers.net
Forum FAQs:
http://freelancers.netrickery.com
To unsubscribe please email:
[EMAIL REMOVED]
If you have difficulties unsubscribing please email:
[EMAIL REMOVED]
|
 |
|