Hai,
I need to add images to datalist from sqlserver, How can i possible to add and edit and delete picture in datalist?
Add images in datalist
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hiren SoniRank #694 · 3.5K reputationPosted Dec 15, 2009, 1:45 AM EST
paul daniel189 reputationPosted Dec 30, 2009, 3:58 AM EST
Try this code
Purushottam RathoreRank #120 · 18.2K reputationPosted Dec 30, 2009, 6:38 PM EST
write this code to show image in datalist.
public string ImageUrl(object yy)
{
DataRowView ff = (DataRowView)yy;
DataRow row = ff.Row;
if (row["PhotoUrl"].ToString() == string.Empty)
return ("http://www.abc.com/DefaultImage.gif");
else
return row["PhotoUrl"].ToString();
}