vb.net - ASP.Net Session variables - struggling with the Cache -


i'm using session variables store , pass data across several pages of asp.net application. behavior bit unpredictable though. i'm setting session variable post page_load follows

protected sub page_loadcomplete(byval sender object, byval e system.eventargs) handles me.loadcomplete if (session.item("scholarshipid") = nothing)     session.add("scholarshipid", "summer2011") end if 

ok far good, on normal page load. if user completes form action, hits next page, , decides oh no, needed change field xyz, , clicks back, corrects data, submits, session variable showing null. why cached session behave way? i'm not destroying/clearing variable, unless fail understand scope of session variables.

try

if (isnothing(session("scholarship")))      session("scholarship") = "summer2011" end if 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -