ASP & Form Submission....why do they hate me?

J

Jeremy

I have a very large HTML form (with about 50 fields) that's being
submitted to an ASP page via the "POST" method. I don't use "GET"
because the data would probably exceed the limit allowed in the query
string.

Anyway, this is probably irrelevant, but this form gets submitted to a
SQL Server 2000 DB.

This form has been working for awhile now. I went in and added a few
if/else statements here and there and when I tried to submit the form
for a test, I get an error.

As it turns out there's nothing wrong with what I entered. I did a
bunch of Response.Write lines to see what the
Request.Form("field_name") lines were returning and they were all
empty!! The Request.Form stopped pulling the information from the
form. I even removed the new code I added and the form STILL didn't
work.

This is driving me crazy because this type of thing happens often
until the ASP page decides it wants to work again. It's also a huge
waste of my time because now I have to screw around with the ASP page
to try to get it to work again when there's nothing wrong with the
code.

Sometimes, half of the Request.Form()s work and the other half won't.
If I move a Request.Form() line that's not working above one that is
working, then it'll work.

Sometimes, if i delete all the ASP code, save it, refresh the page,
paste the ASP code back in, refresh the page again, then it works.
Neither of these things are doing the trick this time.

I would post the code, but I feel it's pointless because there's
nothing wrong with it.

Has this happened to anyone before?
 
T

Tom Kaminski [MVP]

Jeremy said:
I have a very large HTML form (with about 50 fields) that's being
submitted to an ASP page via the "POST" method. I don't use "GET"
because the data would probably exceed the limit allowed in the query
string.

Anyway, this is probably irrelevant, but this form gets submitted to a
SQL Server 2000 DB.

This form has been working for awhile now. I went in and added a few
if/else statements here and there and when I tried to submit the form
for a test, I get an error.

Sounds like you broke something. What's the error?
As it turns out there's nothing wrong with what I entered. I did a
bunch of Response.Write lines to see what the
Request.Form("field_name") lines were returning and they were all
empty!! The Request.Form stopped pulling the information from the
form. I even removed the new code I added and the form STILL didn't
work.

This is driving me crazy because this type of thing happens often
until the ASP page decides it wants to work again. It's also a huge
waste of my time because now I have to screw around with the ASP page
to try to get it to work again when there's nothing wrong with the
code.

Sometimes, half of the Request.Form()s work and the other half won't.
If I move a Request.Form() line that's not working above one that is
working, then it'll work.

Sometimes, if i delete all the ASP code, save it, refresh the page,
paste the ASP code back in, refresh the page again, then it works.
Neither of these things are doing the trick this time.

I would post the code, but I feel it's pointless because there's
nothing wrong with it.

It would help if you at least posted the exact error message - that's a good
indication of what the problem is.
Has this happened to anyone before?

All the time.
 
2

[ + 2 0 r p 3 ]

try using something like

for each x in request.form
response.write x & " " & request.form(x) & <br />
next

instead of writting out request.forms for each field. this will help you
debug much easier too.
 
J

Jeremy Capp

Thanks for the reply. I have an variable that does a request.form on a
set of checkboxes. I'm separating each item in that variable into an
array by doing:

chbox_array = split(var,",")

Then I do an If/Else statement and get a "subscript out of range error"
on chbox_array(0).

When I do a response.write on "var" it's empty (so are all the other
variables)
 
L

Larry Bud

Jeremy Capp said:
Thanks for the reply. I have an variable that does a request.form on a
set of checkboxes. I'm separating each item in that variable into an
array by doing:

chbox_array = split(var,",")

Then I do an If/Else statement and get a "subscript out of range error"
on chbox_array(0).

When I do a response.write on "var" it's empty (so are all the other
variables)

Are you sure you didn't remove the <form></form> tag from your HTML,
or that the checkboxes are still within the appropriate <form> tag?
 

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,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top