Request.Form undefined on localhost but OK when ASP filed upl,oaded to web
Posted on 2006-03-29
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:
returns a string containing whatever the user had typed in the field.
when the files are on the local machine:
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"