problem about an unwanted abandoning session

mcbulan

Member
Joined
Feb 7, 2008
Messages
8
Programming Experience
3-5
Hi all
i am having an interesting problem about session which is abandoned itself. There are about 30-35 pages in my web project (and i'am using VB.net to develop)
I put following code on everypage's on PageLoad event :
/////// pageLoad (mymessages.aspx)
if session("mystatus") = "logged_in" then
label1.text = "Welcome " + session("username")
else
response.redirect("default.aspx")
////////////////

this code works for everypage i added, but except 1 one them. I really dont know why!! There is no setting in my webconfig file about session timeouts, alerady if there was a problem about timeout, other pages will behave as same.
When i logged in to the site then redirect to mymessages.aspx page, it succesfully opens but when i click an imagebutton
(////having code :
sqldatasource1.selectparameters.item("isread").defaultvalue = "0")
it redirects me to the default.aspx file ?!?!?! :(:confused::(:confused:

What can be the cause? what i should do? what i am missing?
Thanx
 
yeah! i found the cause

Yesssss folks!
I've found the problem!!! I use imagebuttons in that page but did not assing an imageurl! So when you click something in the page, session automatically closes down and it redirects you to the top!!!

Solution :
You need to assign an image once you use a imagebutton or any component like that in your page!!

:cool:
 
Back
Top