Hi,
am in c#.net project.
am using the session object for some logic.
e-g:session["Mode"]="Add";
i can refer this by using
if(Session["Mode"]=="Add")
{
logic
}
It is working nice for some moment.later on ,it will tell the error
like(in if statement)
------------------------------------------
'object referrence not set to an instance of an object'
------------------------------------------------------
if i change the 'if' statement as
if(Session["Mode"].Tostring()=="Add")
{
logic
}
it is working nice for some moment . and again tells the same error .So
iam keep on changing between the statements as
i given above & get working.
Why it is killing Me like that.What is the exact statement / Have i to
include something ?
Please help me
With thanks
a drop in the ocean.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!