Passing form values to the asp page from a standard html form works, but trying to pass them manually does not. Is this some oddity with ASP classic? To outline the situation, I have the following standard form:
<form name="login" id="login" method="post" action="login_process.asp">
<input name="userName" type="text" size="30" maxlength="100" />
<input name="password" type="password" size="30" maxlength="100" />
<input name="Submit" type="submit" class="btn" value="Login" />
</form>
On the receiving end (login_process.asp), I have this:
if Request.Form("Username") <> "" and Request.Form("Password") <> "" then
' do stuff here
Now the odd thing is that this form has been in place for years and actually works. But if I try passing values manually to login_process.asp the values never make it:
www.zzz.com/login_process.asp?username=some_user&password=some_password
I added some checks to login_process.asp to see if I could pull the vars from the submit before they were processed like so:
myUsername = request.form("Username")
myPassword = request.form("Password")
response.write "user=" & myUsername
response.write "pass=" & myPassword
and all I’m getting is
user=pass=
So obviously the data isn’t getting passed. But why? What am I overlooking? Passing form data is basic stuff so what gives?
Any insights appreciated!
You are no longer using the form if you are passing them on the querystring, So Request.Form won’t work. You need to use Request.QueryString instead.
More info here