p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Professional (http://p2p.wrox.com/forumdisplay.php?f=63)
-   -   Session Value reset to 0 on submit (http://p2p.wrox.com/showthread.php?t=73031)

beetle_jaipur March 3rd, 2009 05:39 AM

Session Value reset to 0 on submit
 
Hi,

i have one strange problem with session object

when i press submit, my session values reset to zero

i am having two list box, dynamically updated

master List : contains form name
sub list : contains list of colleges depending on master list

its like :
form(named FormID) : Master list ->go button to populate sub list
sub list : contains all colleges depending of form
session("FormID)= request.form("FormID")

and i am updating this data into my db using

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 129, 1, -1, MM_IIF(Session("userName"), Session("userName"), null))

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 5, 1, -1, cdbl(Session("FormID")))

when checking into db first values gets Updated properly Session("userName"), but this Session("FormID) is updated with 'zero'

when checking values before submit button, it shows

userName=08JPR200622
loginPassword=
MemberName=NISHANT SHARMA
FormID=4

and after sumit
userName=08JPR200622
loginPassword=
MemberName=NISHANT SHARMA
FormID=0


dont know what is the prolem, i have tried to search at various websites, but could no get any clue..

kindly help me
thanks for your consideration

regards

ashok sharma

Old Pedant March 3rd, 2009 04:16 PM

Not showing us enough code to guess, but I would bet that it is your problem.

However, do remember that session variables do NOT work if cookies are not enabled in the browser.

If cookies ARE enabled, then you will have to show more code.


All times are GMT -4. The time now is 09:23 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.