Form variables are not taken to ASP page.RSS

12 replies

Last post Sep 06, 2007 06:15 AM by hanspan

  • Form variables are not taken to ASP page.

    Jul 30, 2007 11:10 AM|webgurru|LINK

    I am facing a very odd problem. I am using Windows Pro XP SP2 with IIS 5.1 and IE7 installed. When I try to submit a form (from localhost), variable values are not taken to the asp page. If I execute this to my domain (reside on external server) it works 100%. Code for both files test.html and abc.asp is attached.

    <div>test.html</div> <div> </div> <div> <div><html>
    <head><title>Asking for information</title></head>
    <body>
    <form method="post" action="abc.asp">
    Your name: <input type="text" name="name" size="20"><BR>
    Your email: <input type="text" name="email" size="15"><BR> </div> <div> </div> <div><input type="Submit" value="Submit">
    </form>
    </body>
    </html></div> <div> </div> <div>abc.asp</div> <div> </div> <div><html>
    <head><title>Responding to a form</title></head>
    <body>
    Your name is <% =Request.Form("name") %> <BR>
    Your email is <% =Request.Form ("email") %>
    </body>
    </html></div> <div> </div> <div>It should display value typed in form, but nothing is displayed.</div> <div> </div> <div> </div></div> <div>Best regards,</div>
  • Re: Form variables are not taken to ASP page.

    Jul 31, 2007 09:10 AM|jeff@zina.com|LINK

    Have you cleared the browser cache?  Stopped and restarted the site?

    Jeff

    Have you Binged a solution before posting?
  • Re: Form variables are not taken to ASP page.

    Jul 31, 2007 09:36 AM|webgurru|LINK

    Dear Jeff,

    I did this many times, not only on one machine. I have this problem on 3 different machines.

    Best regards,

  • Re: Form variables are not taken to ASP page.

    Aug 03, 2007 03:30 AM|Zhao Ji Ma - MSFT|LINK

    Hi webgurru,

    The code should work and it is simple to verify. My first guess is that you may have other test asp files, make sure the form action url is right. If this is not the case, how is Response.Write running, do it output correctly?

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support
  • Re: Form variables are not taken to ASP page.

    Aug 03, 2007 03:53 AM|webgurru|LINK

    Dear Zhao,

    I tried everything. Response.Write works perfectly. I tried addition of 2 numbers, it works. I tried Request.QueryString, it works. Only Request.Form is not working.

    Best regards,
    Webgurru

  • Re: Form variables are not taken to ASP page.

    Aug 20, 2007 10:13 PM|LindaFarrell|LINK

    Dear Webgurru

     I have exactly the same problem - so frustrating! No one believes me. Have you been able to find a solution?

     Regards

    Linda

  • Re: Form variables are not taken to ASP page.

    Aug 20, 2007 11:14 PM|qbernard|LINK

    I can't repro. I got the same setup - XP Pro SP2, except I'm still running IE6.

    Works perfectly in my box.

    Cheers,
    Bernard Cheah
  • Re: Form variables are not taken to ASP page.

    Aug 21, 2007 03:29 AM|webgurru|LINK

    Dear Linda,

    No luck. I just installed windows 2000 pro on the same machine to work on this project.

    Best regards,

    Webgurru

  • Re: Form variables are not taken to ASP page.

    Aug 21, 2007 08:17 PM|LindaFarrell|LINK

    Dear webgurru and Bernard 

    I solved the problem! Thank you Bernard, you directed me in the right direction. I downloaded Firefox and it worked. I then went back to IE7 and played around with my security settings and managed to get IE7 working!

     Regards

    Linda 

  • Re: Form variables are not taken to ASP page.

    Aug 21, 2007 10:58 PM|qbernard|LINK

    Mmm.... what kind of IE setting ?

    Cheers,
    Bernard Cheah
  • Re: Form variables are not taken to ASP page.

    Aug 21, 2007 11:24 PM|LindaFarrell|LINK

    The Security Settings for Local Internet (in IE7). I changed all the options that were set to 'disable' to either 'enable'  or 'prompt'. Sorry, not sure which one did the trick.

     

  • Re: Form variables are not taken to ASP page.

    Aug 22, 2007 02:40 AM|qbernard|LINK

    Ouch... hahahaha.. I will check the IE 7 settings on other machine later.

    Cheers,
    Bernard Cheah
  • Re: Form variables are not taken to ASP page.

    Sep 06, 2007 06:15 AM|hanspan|LINK

    I have been experiencing the exact same problem but with PHP. I have found that restoring the default settings on the advanced tab and then a close and re-open of the browser seems to solve the problem. However, I never changed anything in the advanced tab in the first place.... It has also been happening more and more frequently. A final fix for this would be fantastic so if anyone knows which setting do actually need to be changed I would really really grateful!