If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Session Variable not set...

Hi,
I have a strange problem. I have two buttons in the Web form. OnClick
event of one of the buttons, I am setting a session value (Session["Login"]
= 1 - in C#). When I try to retrieve the same session value in another button's
onclick event, as a surprise, the session variable seem to be null. How to
solve the problem?
In the config file, I have the default values generated by the IDE.

Re: Session Variable not set...

Hi,
Thanks for the reply. Login is just a variable which is holding a login
name(string). Is there anything to do with system/project configuration???

Hari

"Sudhir" <sudhirshams@indiatimes.com> wrote:
>
>please do tell what is Login here. Is it a Connection Object. Becuase it
is
>rewcommended in .net that object containing Live references should not be
>put in Session Object.
>Sudhir

Re: Session Variable not set...

Hi Hari,

"Hari" <v_hari@indya.com> wrote in message news:3ca14d31$1@10.1.10.29...
> I have a strange problem. I have two buttons in the Web form. OnClick
> event of one of the buttons, I am setting a session value (Session["Login"]
> = 1 - in C#). When I try to retrieve the same session value in another
button's
> onclick event, as a surprise, the session variable seem to be null. How to
> solve the problem?

Have you established the System.EventHandlers for each button? Did you click
Button1 to set the session value before clicking Button2 to retrieve the value?