sowjanya bommithi

sowjanya bommithi

  • NA
  • 14
  • 3.1k

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

Nov 5 2016 1:19 AM
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)