Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: HTML To ASP Converter

by patgas (Friar)
on Apr 30, 2001 at 20:54 UTC ( [id://76744]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: HTML To ASP Converter
in thread HTML To ASP Converter

Well, I intended it for converting little bits of HTML that get stuck within an actual application. All the benchmarks I've seen show that having an all-ASP page using those long, ugly, concatenated Response.Writes are much faster than mixed HTML/ASP or one Response.Write for each line.

You're right about straight HTML being faster, though. Like I said, it's meant for bits and pieces (like a <head>) to put into an application. I've been using it mostly to convert tables for a calendar-type app that I hand-coded... I guess this script's purpose needs a little better explanation.

-- More than perfect! Let us engage the Concord!

Replies are listed 'Best First'.
Re: Re: Re: HTML To ASP Converter
by $code or die (Deacon) on Apr 30, 2001 at 21:35 UTC
    That's strange that it should benchmark that way. I've noticed that VBScript doesn't have anything like Perl's here-doc capability (unless I am missing something), it would be much nicer to be able to do this (I'll give you a PerlScript ASP example):
    $Response->Write(<<SNIPPET); <HTML> <Head> <Title>$title</Title> </Head> <Body> SNIPPET
    This way, the HTML is left alone still. But that's PerlScript for you! - No hard feelings?
    $code or die
    $ perldoc perldoc

      None at all. I'd love to move to using Perl for everything, but I've been using VBScript for so long now, that it comes easier to me. Besides, I'm not a "developer" per se, I just write stuff to make my life easier (like this script). I've only been hacking away at Perl for about a month now, and this is the first really non-experimental, usable script I've made, and I was kinda proud of it.

      -- More than perfect! Let us engage the Concord!

      There is no here document but it's not that much of hassle to put script tags and use the = as a shortcut for Response.Write, i.e.

      ' ... ' asp code %> <html> <head> <title><%=title%></title> </head> <body> <% ' more ASP code ' ...

      Admittedly it's a few more characters than perl but not too painful. You can just have plain HTML text in your ASP document outside the script tags.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://76744]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.