Session issue

M

Mark Micallef

Try checking to see whether its null. For example:

if( Session["myName"] == null ) {
Session.Add("myName", "xyz") ;
}

Cheers,
Mark
 
J

Jim Cheshire

noor said:
at this time i 'm facing this issue actually i want ot safe a
dataTable in a session veriable if it not exist.
kindly help me out.
thanks

Keep in mind that DataTables can get relatively large quite easily and
storing them in Session may be problematic under load. Make sure that you
have code that prevents large result sets from being returned from database
queries.
 
N

noor

hi,
how can i no if a perticular session veriable exist or not for example i
want to chek if
Session["myName"] exist or not i f its not then i have ot create it
Session.add("myName","xyz").

at this time i 'm facing this issue actually i want ot safe a dataTable in a
session veriable if it not exist.
kindly help me out.
thanks

regards
Noorali chagani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top