Programmatically set drop down field value of profile not saved
Hi everybody,
I have an issue that programmatically set drop down value of profile not saved, I created 'Contact Us' Profile Type and created Contact Us Form, the field 'Enquiry' is drop down of 'Contact Us' profile type. When I filled in contact us form and submitted then I go to admin check the user that Enquiry is not what I selected and select default value. see below code:
var profilemgr = UserProfileManager.GetManager();
var prf = profilemgr.CreateProfile(user, "Telerik.Sitefinity.Security.Model.contactus");
Telerik.Sitefinity.Model.DataExtensions.SetValue(prf, "ContactPhone", contact_phone);
Telerik.Sitefinity.Model.DataExtensions.SetValue(prf, "Comment", comment);
Telerik.Sitefinity.Model.DataExtensions.SetValue(prf, "Enquiry", enquiry);
profilemgr.SaveChanges();