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
Loading
Jignesh TrivediPosted Jan 2, 2012, 11:13 PM
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..