T
TheAmes
Hi
VB.net 2.0 website developed with VWD 2005 Express
one masterpage
one content page aspx
and a global.asax
in the application startup event of the global.asax file i declare a
session variable:
session("ItemCount") = 0
in the masterpage there is an asp:label
in the masterpage load event i put this:
label1.text = session("ItemCount").ToString()
on the content page (default.aspx) i have an imageButton. on the
onlclick event of the imagebutton i have this:
session("ItemCount") = session("ItemCount") + 1
HERES THE PROBLEM:
i press the image button, the page and masterpage reload, and the label
still says 0. BUT i press it again, everything reloads and it goes to
1. ress again and it goes to 2.
My question is, why doesnt it increment to 1 the FIRST time i press the
imagebutton?????
Thanks for your help
Ames
VB.net 2.0 website developed with VWD 2005 Express
one masterpage
one content page aspx
and a global.asax
in the application startup event of the global.asax file i declare a
session variable:
session("ItemCount") = 0
in the masterpage there is an asp:label
in the masterpage load event i put this:
label1.text = session("ItemCount").ToString()
on the content page (default.aspx) i have an imageButton. on the
onlclick event of the imagebutton i have this:
session("ItemCount") = session("ItemCount") + 1
HERES THE PROBLEM:
i press the image button, the page and masterpage reload, and the label
still says 0. BUT i press it again, everything reloads and it goes to
1. ress again and it goes to 2.
My question is, why doesnt it increment to 1 the FIRST time i press the
imagebutton?????
Thanks for your help
Ames