Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-03-29
8
Medium Priority
?
636 Views
Last Modified: 2008-01-09
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">
</form>


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"
....
0
Comment
Question by:rossmcm
  • 5
  • 2
8 Comments
 
LVL 25

Accepted Solution

by:
kevp75 earned 300 total points
ID: 16321747
hmm....first I've heard of this.  Instead of request.form, try just the generic request, see if that'll work for you
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16321889
Is it just Request.Form that isn't playing, or is it the ASP objects in gereral ?
0
 
LVL 25

Expert Comment

by:kevp75
ID: 16322271
also....is this running on IIS?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rossmcm
ID: 16325910
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.
0
 
LVL 25

Expert Comment

by:kevp75
ID: 16326123
try using request("formfiled") instead of request.from("formfield")

see if that works.

i think I just saw what the problem may be.....in 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
0
 
LVL 25

Expert Comment

by:kevp75
ID: 16326134
in other words you have:
Request.Form ("LoginName")

change it to:
Request.Form("LoginName")
0
 

Author Comment

by:rossmcm
ID: 16326679
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")

or  

  Request.Form                      ("LoginrName")

0
 
LVL 25

Expert Comment

by:kevp75
ID: 16326770
essentially you can have all the whitespace in the world, but..... I have run into problems using some funstions and having to many spaces.

LOL.....it's amazing what sleep'll do to a body  :)

thanks for the points
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month21 days, 4 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question