PDA

Click to See Complete Forum and Search --> : request.form not working !!..


sarath_777
Feb 15th, 2001, 11:42 AM
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

sebs
Feb 15th, 2001, 12:00 PM
should it be:

strDept = Request.Form("Department")

Cander
Feb 15th, 2001, 12:31 PM
you named the field Department, but you are using dept in the request.form..

sarath_777
Feb 15th, 2001, 12:37 PM
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

sarath_777
Feb 15th, 2001, 01:31 PM
HI THANKS TO ALL..
IT IS WORKING NOW.. I HAD LOAD THE HTML
PAGE AGAIN AND IT STARTED WORKING !