Posted on: 3/19/2012 7:18:41 AM | Views : 490

Hello all,
I have problems with asp.net profile. (specificaly when I save and retreive image to/from sql database)
here is the code:

1 - Saving the profile data:
var personalImage = Server.MapPath("~/TempImage/") + Path.GetFileName(fUploadPersonal.PostedFile.FileName);
var profile = ProfileBase.Create(userName);
if (employeeName != "")
{
profile.SetPropertyValue("EmployeeName", employeeName);
}
if (organizationId != 0)
{
profile.SetPropertyValue("OrganizationId", organizationId);
}
if (address != "")
{
profile.SetPropertyValue("Address", address);
}
if (mobileNumber != "")
{
profile.SetPropertyValue("MobileNumber", mobileNumber);
}
if (personalImage != null)
{
profile.SetPropertyValue("PersonalPhoto", personalImage);
}
profile.Save();

///////////////////////////////////////
after s ...

Go to the complete details ...