[AccessD] OT: ASP Oddity

Arthur Fuller artful at rogers.com
Fri Jan 9 14:22:52 CST 2004


I think so. This is mixed-language logic. A little weird first time you
encounter it but quite logical IMO.

Arthur

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of
DWUTKA at marlow.com
Sent: Thursday, January 08, 2004 2:59 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] OT: ASP Oddity


Sorry for the OT post, but I ran into this last month, and was just
flabbergasted that this worked this way.

I was doing an ASP sub-contract for my sister, for a jewelry company
(http://edlevinjewelry.com) .  In the HTML of some of the pages, I found
stuff like this:

<% If so.type="merchant" then %>
<b>This is a test</b>
<% End if%>

It wasn't coded (or worded, obviously) like that, but that is the gist of
it.  There was an If Then clause, with regular old HTML in the middle.  Sure
enough, if the criteria isn't met, the HTML isn't displayed.

I never realized (until I saw that), that you could do that.  Up until now,
I have always done something like this:

<%
If This=True Then
	response.write "<b>Test</b>"
End if
%>

In that case, the ASP is writing out the HTML.  In some cases, it doesn't
make much of a difference.  However, I write most of my HTML by hand, using
the Microsoft Script Editor, which does a lot of autocompletion, and makes
writing raw HTML a breeze.  But when I had to put out conditional HTML, I
lost all of the advantages of the editor, because I was putting the HTML
into a string.  What's odd, is I have never run across this in ASP
documentation.

Once again, sorry for the OT post, but I know there are several listers out
there that are either starting out in ASP, or have been using it for a
while, and hopefully, this will be helpful to ya'all.  Just out of
curiousity, did anyone else know this?

Drew
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 1/2/2004




More information about the AccessD mailing list