Request.Form returns nothing

S

Steve Last

Hi all,

I’m using IIS6 for our college Intranet and I’m having trouble using
Request.Form. Here is my code:

<%
If Request.QueryString("action") = "show" Then
Response.Write "title: " & Request.Form("NewsTitle") & "<br />"
End If
%>
<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

The page refreshes and generates the following HTML:

title: <br />

<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

The Request.Form(“NewsTitleâ€) is empty. I’m sure my HTML and ASP/VBScript
is ok, I’ve been writing for ages, but I’ve never seen it do this before.
Request.QueryString works fine.

After some Google searches some have hinted at Integrated Windows
Authentication being involved. The page in question doesn’t have any
authentication.

Any ideas?

Thanks in advance – and if this is the wrong newsgroup could you point me in
the right direction.

Steve
 
M

Mike Brind

Steve said:
Hi all,

I'm using IIS6 for our college Intranet and I'm having trouble using
Request.Form. Here is my code:

<%
If Request.QueryString("action") = "show" Then
Response.Write "title: " & Request.Form("NewsTitle") & "<br />"
End If
%>
<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

The page refreshes and generates the following HTML:

title: <br />

<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

The Request.Form("NewsTitle") is empty. I'm sure my HTML and ASP/VBScript
is ok, I've been writing for ages, but I've never seen it do this before.
Request.QueryString works fine.

After some Google searches some have hinted at Integrated Windows
Authentication being involved. The page in question doesn't have any
authentication.

Any ideas?

Thanks in advance - and if this is the wrong newsgroup could you point me in
the right direction.

Try doing this to see if you get anything:

For Each x in Request.Form
Response.Write x & ": " & Request.Form(x)
Next
 
S

Steve Last

Mike Brind said:
Try doing this to see if you get anything:

For Each x in Request.Form
Response.Write x & ": " & Request.Form(x)
Next



Thanks for the reply. I've tried this - it returns absolutely nothing, here
is the HTML after form submission:


<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

It's very strange. After more testing it seems to work (every time) when
using Firefox, but not IE6 or IE7 (Beta3).

I’m completely confused now!

Any more ideas?

Cheers, Steve
 
L

Larry Bud

Steve said:
Hi all,

I'm using IIS6 for our college Intranet and I'm having trouble using
Request.Form. Here is my code:

<%
If Request.QueryString("action") = "show" Then
Response.Write "title: " & Request.Form("NewsTitle") & "<br />"
End If
%>
<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

The page refreshes and generates the following HTML:

title: <br />

<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

The Request.Form("NewsTitle") is empty. I'm sure my HTML and ASP/VBScript
is ok, I've been writing for ages, but I've never seen it do this before.
Request.QueryString works fine.

After some Google searches some have hinted at Integrated Windows
Authentication being involved. The page in question doesn't have any
authentication.

Any ideas?

Your code works.... Maybe a buffering problem?
 
S

Slim

try a different name besides action maybe?

have you tested that action does = "show"?
 
S

Steve Last

Larry Bud said:
Your code works.... Maybe a buffering problem?



Slim - thanks, but i'm 100% sure action=show is working.

Larry - I've never looked at any buffering issues before, any pointers you
can give? Settings somewhere in IIS maybe?

Thanks both...

Steve
 
T

tctekkie

Use Request.FORM instead of Request.QUERYSTRING.

Your form method is set to POST.

Use Request.Form if using POST
Use Request.QueryString if using GET
 
T

tctekkie

OOPS!! My Overlook... Disregard my last post please!! (I think I've
been working too long today). I didn't see the parameter being passed
in the querystring... SORRY! :)
 
M

Mike Brind

Steve said:
Thanks for the reply. I've tried this - it returns absolutely nothing, here
is the HTML after form submission:


<form action="/_admin/blogs/test.asp?action=show" method="post">
<input type="text" name="NewsTitle" />
<input type="submit" value="Add" />
</form>

It's very strange. After more testing it seems to work (every time) when
using Firefox, but not IE6 or IE7 (Beta3).

I'm completely confused now!

Any more ideas?

Cheers, Steve

The only time I have ever seen anything like this is when I tried to
submit a form from an html email in Outlook with Firefox set as a
default browser. It never worked. When I made IE the default browser,
it worked every time. I never got to the bottom of it. Don't even
know if it's related to your troubles....
 
S

Steve Last

That's it - thanks Mike... :)

I set IE6 to be the default browser, restart it and all was fine - same with
IE7.

I hope this post thread is searchable from Google so others who have this
problem can find this answer. I searched for hours and found nothing!

Thanks again,

Steve
 
L

Larry Bud

Slim - thanks, but i'm 100% sure action=show is working.
Larry - I've never looked at any buffering issues before, any pointers you
can give? Settings somewhere in IIS maybe?

Try response.buffer=false at the top of your page.

There is a default setting in IIS for buffer... I would also try
putting some no-cache code in the page for debugging purposes to make
sure the page is actually reloading.

It's got to be some sort of setting like this. I copied your code
verbatim and it works fine on my server (iis5).
 

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,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top