Request.Form.Count varies by machine?!

C

Chris Nelder

I think I must be losing my mind here. I've got the same page running
on two different machines. I do the same form post on both, and on one
machine I get Request.Form.Count=21 and on the other it's 22. ?!?

I have iterated through the form collection and printed out every key
on both machines and compared them carefully. They are identical.

WTF is going on here? I even went so far as to reset IIS on both
machines, and the counts are still different.

Any and all clues appreciated!
 
R

Ray at

It's hard to say without seeing your form, but say you have a form like
this:


<form method="post" action="testp.asp">
<input type="text" value="something else" name="txt2">
<input type="image" src="/images/admin.gif">
<input type="submit" value="submit" name="submit">
</form>

If you submit by pressing enter or Ctrl+M, your count will be 1, because the
image input is the default submit, and if it's not clicked, it won't return
in the form collection.

If you submit by clicking the image, you'll get three items, the textbox,
and the cooridnates of your click.

If you submit by clicking submit, you'll get two items, the textbox, and the
submit button.

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top