ASP/.NET Web Hosting
* 3 Months FREE *
CLICK HERE!
 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
216 active users
911 visitors today
1198 pages today
how is this done?
As seen on these sites
Special thanks go to the sites that support me by publishing my articles.
See more

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

ASP.NET Blog
ASPRSS
ShawThing

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


CoverYourASP Mugs, T-shirts, caps - even Boxer shorts...
I don't make a penny from these, but they're a lot of fun! Don't you need a new mouse mat?


New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!