Haslett, Andrew
andrew.haslett at ilc.gov.au
Fri Jan 9 05:37:26 CST 2004
Yeah there was a big argument regarding 'context-switching' in the asp community, especially with ASP2.0. The performance difference in ASP3.0 is negligible so it really boils down to your preference, what is easier to read/debug etc. I think the infamous MS article "Top 25 techniques for ASP" or the like included a statement about context switching, although a couple of the issues raised in that article were debateable. Cheers, Andrew -----Original Message----- From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] Sent: Friday, 9 January 2004 6:29 AM 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not.