Wife/Girlfriend/Sister?
Pepper Spray &
Stun Gun Specials!
KEEP THEM SAFE.
 CoverYourASP --> ASP Render blocks --> Part 4

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
15 active users
44 visitors today
165 pages today
how is this done?
Tools I use

CoverYourASP
Copyright © 1999-2012 James Shaw.
All rights reserved.

ASP.NET Blog
RSS submissions
E-commerce

Now open source with SourceForge!

Security

I'm pushing it to say security, but a side-effect of the bandwidth fix is that when everyone in the whole world does a View/Source on your page, they see the almost unintelligible code below. Yes, they can buy a code formatter that will make it look pretty again, but at least admit it's making it more difficult for them?

<html><head><title>My page</title></head><body>We're in "HTML mode" here...<p>I am called temp.asp<p>...and here.</body></html>

Try it now - View/Source - apart from the source code blocks it is just one long line of HTML. (Actually there is one exception. If you have to output an HTML comment add a \n (newline) after it)

It's out there - ASP.NET

My last ditch attempt to persuade you now - ASP.NET. Well it is coming you know, and ASP.NET doesn't allow render blocks that include functions anymore. So this particularly nasty piece of code (IMHO)...

<% function DoSomething ( ) { %>
   something in HTML
<% } %>

...now has to be written like this:

<script language="JavaScript" runat="server">
function DoSomething ( )
{
   Out ( 'something in HTML' );
}
</script>

I hope you're convinced now? If not, begone! Back to FrontPage with you...

Update: This article has roused many sleeping developers and prompted more feedback than usual! Read some comments...

Featured sponsor
My favorite resources

Tiki Statues - Tiki Masks - Tiki Totems



I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...


Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!