***solved***Session variable not available when page 1st displayed (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


mylu -> ***solved***Session variable not available when page 1st displayed (3/8/2007 15:47:19)

I'm using the post / action method to display data on a second page.

<form method="POST" action="rpts/rptopencalls.asp">
<input type="submit" value="Open SO's" name="B1"><input type="hidden" name="<%response.write "accountid" %>" size="20" value="<%=Session(appName&"x_spare")%>">
</form>

This code works fine but only after you you hit the page rptopencalls.asp the first time.
The first time you submit the data the DRW returns no records as if the session is not loaded.

If you click on the back button then submit again all is well and all the submit buttons work and pull data from the different reports.

Any idea?

Thanks




Spooky -> RE: Session variable not available when page 1st displayed (3/8/2007 17:25:32)

If you view the html source of the first page, does it show the correct values?




mylu -> RE: Session variable not available when page 1st displayed (3/9/2007 12:46:34)

Source View

<form method="POST" action="rpts/rptopencalls.asp">
<input type="submit" value="Open SO's" name="B1" style="font-family: Tahoma; font-size: 8pt"><input type="hidden" name="accountid" size="20" value="DSS"></form>

value="DSS"

Yes it does.






BeTheBall -> RE: Session variable not available when page 1st displayed (3/9/2007 12:50:42)

What is the SQL you are using for the DRW?




mylu -> RE: Session variable not available when page 1st displayed (3/9/2007 15:49:56)

fp_sQry="SELECT * FROM OpenServiceOrderstech WHERE (AccountID = '::AccountID::' AND Status <> 'closed' AND Status <> 'void') ORDER BY SONumber DESC"

No diet here. It's the only statement on the page.




BeTheBall -> RE: Session variable not available when page 1st displayed (3/9/2007 15:52:27)

Do you have a link we can look at?




mylu -> RE: Session variable not available when page 1st displayed (3/9/2007 16:56:21)

Resolved. Went on a diet....
Thanks again




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.492188E-02