c# - Why is my session variable declared in master page blank on a web page? -


i declared in master page load:

session["sessionstring"] = "stringx"; 

in web page on load also, call it

string sessionstring= (string)session["sessionstring"]; 

i debug , value in web page "" wrong?

jw lim correct...content page's load event fire before master page load.

@user3445314 , can use "session_start" event in global.asax , set values same set in master page.

"session_start" event fires first , content page load event occur.

i hope may solve problem


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -