[thelist] ASP - Request Object

Joel Morris joelm at citycent.com
Wed May 31 18:40:52 2000


Thanks for your thoughts. Yeah, I'm self taught on ASP, too.

O'Reilly's "ASP In A Nutshell" book specifically says there is a
Request.Form.Key(), Request.Form.Count(), and Request.TotalBytes property of
the Request object. Wrox's "Active Server Pages 2.0" book references
Request.TotalBytes. And there's a reference to Request.Form.Count in Sams'
"Active Server Pages Unleashed".

Oh well.

My problem is I need to loop through all of the fields in a form; the number
and names of the fields will vary because they are being generated from a
database.

And all of this code _does_ work on my NT 4.0 IIS 4 development server.

Any other ideas?

Joel
joelm@citycent.com


aardvark (and > > I) said:

> i'm not a trained ASP guy, i'm self-taught, but bear with me...
>
> > From: "Joel Morris" <joelm@citycent.com>
> >
> >  Microsoft VBScript runtime error '800a01b6'
> >  Object doesn't support this property or method: 'Request.Form.Key'
> >
> >  /extranet/confirm1.asp, line 21
> >
> > line 21 is the Request.Form.Key line above
>
> you need to request the field name... form is a valid item in the
> Request object, but key isn't... it's arbitrary...
>
> > This also happens if I write:
> >
> >  strBytes = Request.TotalBytes
> >  Response.Write strBytes & "<p>"
> >
> > ...it'll give an error that it doesn't support 'Request.TotalBytes'
>
> TotalBytes is also not a part of the Request object, so it won't
> work...
>
> > However, the following do work:
> >
> >  Request.Form("inputname")
> >  Request.Form.Item("inputname")
> >
> > I took both pages, uploaded them to my NT server, and everything works
> > just fine.
>
> because that's the correct way to call them... you want the form
> field "inputname" from the Reuest object... or you want the form
> item called "inputname" from the Request object...
>
> you could also just do Request("inputname") and get the value from
> "inputname" as well as a querystring called "inputname"
> ('foo.asp?inputname=foo' for example)...
>
> > Any ideas on why I get errors on recognizing such simple Request
> > object properties? Might this be a FP2000 extensions issue?
>
> do they work on any other IIS box you have sitting around?
>
> that's the best i can do right now... there are others who are more
> well-versed in the lingo... i just make it work... somehow...