Note that there are some explanatory texts on larger screens.

plurals
  1. PORetrieve back custom data type from logged-in user to the page for editing
    primarykey
    data
    text
    <p>I am trying to get saved member profile data back from Umbraco CMS. In Umbraco there is custom data types. I created one suitable for dropdownlist and used it during registration process. After a user is created and logged-in, user should be able to update or change its profile information in profile page. During registration process I grab dropdownlist custom data type like in the following but I stuck at the point how to retrieve back that data along with user selection to the user profile page for editing.</p> <p>The code snippet for grabbing custom data for dropdownlist during registration. </p> <pre><code> DropDownList ddlSector = (DropDownList)CreateUserWizardStep0.FindControl("Sector"); XPathNodeIterator pvDdlSector = umbraco.library.GetPreValues(1206); pvDdlSector.MoveNext(); XPathNodeIterator pvValuesDdlSector = pvDdlSector.Current.SelectChildren("preValue", ""); while (pvValuesDdlSector.MoveNext()) { ddlSector.Items.Add(new ListItem(pvValuesDdlSector.Current.Value, pvValuesDdlSector.Current.GetAttribute("id", ""))); } </code></pre> <p>The code snippet on Created User event for saving user</p> <pre><code> MemberProfile mp = MemberProfile.GetUserProfile(cuw.UserName); DropDownList ddlSector = (DropDownList)CreateUserWizardStep0.FindControl("Sector"); string lbSectorValue = ""; foreach (ListItem item in ddlSector.Items) if (item.Selected) lbSectorValue += (lbSectorValue == "" ? "" : ",") + item.Value; mp.Sector = lbSectorValue; </code></pre> <p>Any help much appreciated</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload