Hello,
Can anyone tell me, how can i get Profile pictures of users which were uploaded by them during registration at run time from database?
Loading
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 attend4days leftRegister
VikramRank #9,295 · 208 reputationPosted Oct 12, 2011, 10:46 PM EDT
Shweta Kuthi50 reputationPosted Oct 13, 2011, 8:02 PM EDT
VikramRank #9,295 · 208 reputationPosted Oct 13, 2011, 8:32 PM EDT
Here is template code :
DataTable dtDetail = new DataTable();
dtDetail = getProfileDetails(userID);
if (dtDetail.Rows.Count > 0)
{
if (dtDetail.Rows[0]["fieldname"].ToString().Length > 0)
{
//[ImageControlID].ImageUrl = "[Your Folder]/" + dtDetail.Rows[0]["fieldname"].ToString();
MemberIMG.ImageUrl = "Photo/" + dtDetail.Rows[0]["ipath"].ToString();
}
else
{
EMIPath.ImageUrl = "Images/image-not-found.gif";
}
}
This is how I achieve this functionality. I have created Image Name Unique and saved Image Name into database field instead of total path of Image.
Hope this will help you.
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 13, 2011, 9:29 PM EDT
i have answered to thread about the same. You may try this.
http://www.c-sharpcorner.com/Forums/Thread/142043/how-to-save-and-retrive-image-fromto-picture-box.aspx