Hi all,

I am having a problem with posting a value from a form using POST method, I am using a SELECT tag that is set to the default of one selection only.
The value is passed to an ASP page that then redirects according to the value.

The problem is that when the user first opens the page they make their selecton and click on the submit button. It seems that the value is not passed on the first click because the page is just reloaded, however on the second click and all subsequent clicks the value is passed to the ASP page perfectly.

Any help would be greatly appreciated!!!!!!!!!!!!!!!!!!!!

Thanks Greg for your help thus far

Source code follows:

POSTing ASP Page:

<%
'Edited by JBM 03/05/04
'HTML form to capture user input and post it to Bridge.asp
strMonthVar = Session("dbSearchVar")
Response.Write strMonthVar
%>

<html>
<Head>
<Title>ACB Realtime Report Month Selector</Title>
</Head>
<Body>

<Hr>

<H4 align = Center><U>Please Make Your Selection/U></H4>

<P align = Center><Form Method = "Post" Action = "Bridge.asp" >

<select name = "strMonth">
<option value="NoSelect" SELECTED>-----Select-----</option>
<option value="">Show All Records</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>

<P align = center><input value = "View Report" type = submit id=submit1 name=strMonth"></P>

</Form></P>

<Hr>

</Body>

<Html>

Recieving ASP Page:

'Edited by JBM 03/05/04
'Bridge.asp is used to capture the user input passed by HTML form on ACBRealtimeMonthSelector.asp
'Then to interrogate the var to redirect to the correct page

<%
Dim strMonthVar
strMonthVar = (Request.Form("strMonth"))
Session("dbSearchVar") = strMonthVar
'strMonthVar = Null
Response.Write strMonthVar

Dim StringVar

strMonthVar = Session("dbSearchVar")

If Not strMonthVar = "NoSelect" then
Response.Redirect "GenericList.asp"
Session("dbSearchVar") = Null
Response.Write strMonthVar
Else
Response.Redirect "ACBRealtimeMonthSelector.asp"
Session("dbSearchVar") = Null
Response.Write strMonthVar
End If
%>