[thelist] Request object

Norman Beresford Norman at pigfe.freeserve.co.uk
Wed May 10 06:18:03 2000


Hi all,

Sorry if this seems a bit off topic, but it's a thought that just popped
into my head and it made me realise that I don't understand how ASP works at
a fairly fundamental level.

I've got a couple of pages (I could never bring myself to call it an
application) which allow users of a site to author documents.  Each document
is stamped with the authors id, which is stored in a tempoary cookie created
when they log into the site.

At present the authoring involves the submission of a form.  To put the
document together three items within the Request.Form collection are
accessed and one item within the Request.Cookies collection.  This is where
I realised that I don't know how ASP works.  I'm referencing the three items
within the form by setting a variable to the value of each one, so:

var1 = Request.Form("var1")
var2 = Request.Form("var2")
var3 = Request.Form("var3")

Now am I making three visits to the Request.Form collection, or am I making
one visit and retriving three items?  I suspect the former.  And if it is
the former does the fact that I've accessed it once, make subsequent visits
faster.  And if it does, does it make accessing the whole Request object
faster, or just the Request.Form collection?

I'm sure that the actual answer is really quite simple (some would say
rather like me) so just in case I've included a not very good tip :)

Norman

<tip type="ASP URL" author="Norman Beresford">

Always handy for ASP matters
http://www.4guysfromrolla.com/

</tip>