Request.Form returns nothing

Discussion in 'ASP General' started by Steve Last, Jul 6, 2006.

  1. Steve Last

    Steve Last Guest

    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
    Steve Last, Jul 6, 2006
    #1
    1. Advertising

  2. Steve Last

    Mike Brind Guest

    Steve Last wrote:
    > 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

    --
    Mike Brind
    Mike Brind, Jul 6, 2006
    #2
    1. Advertising

  3. Steve Last

    Steve Last Guest

    "Mike Brind" wrote:

    >
    > Steve Last wrote:
    > > 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
    >
    > --
    > Mike Brind
    >
    >




    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
    Steve Last, Jul 6, 2006
    #3
  4. Steve Last

    Larry Bud Guest

    Steve Last wrote:
    > 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?
    Larry Bud, Jul 6, 2006
    #4
  5. Steve Last

    Slim Guest

    try a different name besides action maybe?

    have you tested that action does = "show"?



    "Steve Last" <Steve > wrote in message
    news:...
    > 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
    >
    Slim, Jul 6, 2006
    #5
  6. Steve Last

    Steve Last Guest

    "Larry Bud" wrote:

    >
    > Steve Last wrote:
    > > 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?
    >
    >




    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
    Steve Last, Jul 6, 2006
    #6
  7. Steve Last

    tctekkie Guest

    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
    tctekkie, Jul 6, 2006
    #7
  8. Steve Last

    tctekkie Guest

    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! :)
    tctekkie, Jul 6, 2006
    #8
  9. Steve Last

    Mike Brind Guest

    Steve Last wrote:
    > "Mike Brind" wrote:
    >
    > >
    > > Steve Last wrote:
    > > > 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
    > >
    > > --
    > > Mike Brind
    > >
    > >

    >
    >
    >
    > 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....

    --
    Mike Brind
    Mike Brind, Jul 6, 2006
    #9
  10. Steve Last

    Steve Last Guest

    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







    "Mike Brind" wrote:

    >
    > Steve Last wrote:
    > > "Mike Brind" wrote:
    > >
    > > >
    > > > Steve Last wrote:
    > > > > 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
    > > >
    > > > --
    > > > Mike Brind
    > > >
    > > >

    > >
    > >
    > >
    > > 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....
    >
    > --
    > Mike Brind
    >
    >
    Steve Last, Jul 10, 2006
    #10
  11. Steve Last

    Larry Bud Guest

    > 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).
    Larry Bud, Jul 10, 2006
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bijoy Naick

    Query returns nothing

    Bijoy Naick, Jan 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    450
    Prince
    Feb 1, 2004
  2. Bob Green via .NET 247

    qry returns nothing (no data matched qry)

    Bob Green via .NET 247, Apr 16, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    376
    Sebastian
    Apr 16, 2004
  3. MattB
    Replies:
    2
    Views:
    4,649
    Scott Allen
    Feb 16, 2005
  4. Request.Form returns nothing

    , Oct 19, 2005, in forum: ASP General
    Replies:
    1
    Views:
    123
  5. Devin Jeanpierre
    Replies:
    2
    Views:
    427
    Devin Jeanpierre
    Feb 14, 2012
Loading...

Share This Page