I want to read a DB data and put into session and then need to read the session value and insert into another Table..
Issue i am facing here is
First time wen reading value frm DB ., if any fields contains NULL ., then how to assign and read the the Null value in Session variable
Then how to assign and read the the Null value in Session variable
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 2, 2012, 6:13 PM EST
use IsDBNull when retrive from database and set initial value.
In vb
if(IsDBNull(dr(0)))
Session("test") = 0;
end
in C#
if(string.IsNullOrEmpty(StringValue))
{
Session["test"] = 0;
}
hope this help..