Results 1 to 5 of 5

Thread: request.form not working !!..

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    Angry

    hi,
    this is a simple ASP example ..but it is not working ..
    i have a html page that has a from where one field that
    stores "Dept" and calls SpringNotice.asp.. as below:

    <BODY>
    <IMG SRC="tulip.jpg" WIDTH="221" HEIGHT="120">
    <H1>Spring Retreat Logistics</H1>
    <FORM ACTION="SpringNotice.asp" METHOD=POST>
    <INPUT TYPE="TEXT" NAME="Department" >
    <INPUT TYPE="SUBMIT" VALUE="Submit"></P>
    <INPUT TYPE="RESET" VALUE="Reset"></P>
    </FORM>


    This called ASP file is :
    <BODY>
    <H1> SPRING RETREAT </H1>
    <H2> THANK FOR YOU REGISTERING IN..
    <%
    dim strDept
    strDept = Request.Form("Dept")
    Response.Write strDept
    %>
    <P>..department...</H2>
    </BODY>

    I am running Personal Web Server on windows2000 professional.. But, it is not printing the variable strDept .. Why is the server not storing the variable ?
    thanks
    sarath

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    should it be:

    strDept = Request.Form("Department")

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    you named the field Department, but you are using dept in the request.form..
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    i changed to Dept... still does not work

    hi ,
    thanks for your reply.. but, i had changed
    the Department to Dept.. so as keep it same ..
    .. but it still does not work..
    i had earlier typed in a hurry..
    Is there any other reason for this happening..
    how do i check that PWS is working properly..
    I mean, whether it is storing the variable ..?
    thanks
    sarath

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    HI THANKS..

    HI THANKS TO ALL..
    IT IS WORKING NOW.. I HAD LOAD THE HTML
    PAGE AGAIN AND IT STARTED WORKING !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width