Request.Form undefined on localhost but OK when ASP filed upl,oaded to web

I have an ASP page that implements a login function and has a form with a Login Name field and password field.  When the user clicks on the button it submits the form to another ASP page.  That page looks up the details in a database and logs the user in if OK.  All pretty standard stuff, and it works fine.  

However I thought I would speed things up b y developing it on the local machine instead of the edit/FTP/Test cycle.  So I installed IIS and it goes except that the contents of the Forms collection are all undefined.

when the files are on the web:

  Request.Forms ("LoginName")

returns a string containing whatever the user had typed in the field.

when the files are on the local machine:

  Request.Forms ("LoginName")

returns undefined.

what could be different?

heres the form:

<form name="LoginForm" action="membervalidate.asp?backto=<%=Server.URLEncode (Request.querystring ("backto")) %>" method="post">
  <input type="text" name="LoginName" size="16" maxlength="50">
  <input type="password" name="Password" size="16" maxlength="50">

and here is membervalidate.asp:

var Connection = OpenDatabase () ;
if (Connection != null)
    Response.write (Request.Form ("LoginName") + "<br>") ;                            // writes "Undefined"
    Response.write (Request.Form ("LoginName").Item + "<br>") ;                    // writes "undefined"
Who is Participating?
hmm....first I've heard of this.  Instead of request.form, try just the generic request, see if that'll work for you
Carl TawnSystems and Integration DeveloperCommented:
Is it just Request.Form that isn't playing, or is it the ASP objects in gereral ?
kevp75Commented: this running on IIS?
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

rossmcmAuthor Commented:
Yes, IIS, Windows XP SP2.  Everything else about the site seems to go OK - database access (once I changed the path) is OK, querystring works OK.
try using request("formfiled") instead of request.from("formfield")

see if that works.

i think I just saw what the problem may the code you posted you have a space after Request.Form.....if it is not a typo, get rid of that space on both, and try it out
in other words you have:
Request.Form ("LoginName")

change it to:
rossmcmAuthor Commented:
aaaarrrrgggghhhh!!!   It now works.  The only thing I did was went to bed.  So it might be that installing IIS and then not rebooting before I tried to use it was not a good idea.

Sorry to waste your time.  You get the points anyway.

Incidentally, I don't see how the inserted space would make any difference - white space is white space isn't it?  I could presumably have



  Request.Form                      ("LoginrName")

essentially you can have all the whitespace in the world, but..... I have run into problems using some funstions and having to many spaces.'s amazing what sleep'll do to a body  :)

thanks for the points
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.