3
Answers

how to handle null value while getting image in asp.net

Session["EmpPhoto"] = dsUser.Tables[0].Rows[0]["EmpPhoto"].ToString();
 
imageUser.ImageUrl = Session["Photo"].ToString();//here i am getting error 
 
i have to       show username and userphoto after he logged into the site. but for a particular user i dont have image so i am getting error" Object reference not set to an instance of an object.
"
 
Answers (3)