Hai,
I need to add images to datalist from sqlserver, How can i possible to add and edit and delete picture in datalist?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Purushottam RathorePosted Dec 30, 2009, 11:38 PM
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();
}
paul danielPosted Dec 30, 2009, 8:58 AM
Try this code
Hiren SoniPosted Dec 15, 2009, 6:45 AM