0

I'm try to achieve in classic asp what has been done here in ASP.NET

Asp.net - Empty QueryString Parameter

So if i have a page question.asp

<form action="result.asp" method="POST">
Name:<input type="Text" name="name" maxlength="30"><BR>
Age:<input type="Text" name="age" maxlength="10"><BR>
Sex:<input type="Text" name="Sex" maxlength="10"><BR>
<input type="Submit" name="submit" value="submit"><BR>
</form>

And nothing is input in e.g. 'Sex' text box I stil need to know that it was sent. e.g. name=karl&age=39&sex=

Thanks

1 Answer 1

0

If you're using the post method, you should look into the Request.Form to get the parameters passed. The following code will print the keys/values received, including empty ones. Watch out though, it will also return the submit input !

Dim i
for i = 1 to request.form.Count 
   response.write request.form.Key(i) & " " & request.form.Item(i) & "<br />"
next

Edit: The same goes for Request.QueryString

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.