ASP/.NET Web Hosting
* 3 Months FREE *
CLICK HERE!
 CoverYourASP --> ASP Render blocks --> Part 3

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
143 active users
3099 visitors today
4661 pages today
how is this done?
ASP.NET Showcase
ASP.NET Graph and Chart Component with FREE developer version

ASP.NET Shopping Cart and E-commerce Control with FREE trial download

ASP.NET Web Hosting with free month and setup

$15 Domain Name Registration from .DNR.
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!

But what about readability?

Ok, let's say you're with me on the bandwidth issue. But now the code isn't readable, right? Here's the real answer (using my Out function to wrap Response.Write):

<%@ Language=JavaScript %>
<%
// the statement below enables buffering of the data sent to the browser.
// see http://learnasp.com/learn/whybuffer.asp
%>
<% Response.Buffer=true %>

<%
   Out ( '<html>' );

   Out ( '<head>' );
      Out ( '<title>My page</title>' );
   Out ( '</head>' );

   Out ( '<body>' );

      Out ( 'We're in "HTML mode" here...' );

      // output the name of the script itself
      var sScript = Request.ServerVariables ( "SCRIPT_NAME" );

      Out  ( '<p>I am called ' + sScript );

      Out ( '<p>...and here.' );
      
   Out ( '</body>' );
   Out ( '</html>' );
%>

Indentation, comments, efficiency. What more could you possibly want? You want MORE?

Part 4: Security...

Featured sponsor
My favorite resources

Selling products online - read how James does it now



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...


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!