I am getting the following error:
The type or namespace name 'GetPreValueAsString' does not exist in the namespace 'Umbraco' (are you missing an assembly reference?)
My code snippet where this error occurs is:
foreach (var member2 in ApplicationContext.Current.Services.MemberService.GetAllMembers().OrderBy(member2 => member2.Name)){
var codeTheme = Umbraco.GetPreValueAsString(member2.GetValue<int>("codeTheme"));
<p>@codeTheme</p>
}
I am using the latest version of Umbraco, I think it is because I need @using Umbracomagicmissingreference at the top of the page, but I have no idea which one is missing.
I have a dropdown list in the member area which I am trying to get the text values from so I can create a form that has these values.
Thank-you
umbraco.library.GetPreValueAsString(member2.GetValue<int>("codeTheme")
looped through the members and output their chosen option. My issue is I want to loop through all the available options in the drop down list. – Ginger SquirrelXPathNodeIterator iterator = umbraco.library.GetPreValues(1124); iterator.MoveNext(); XPathNodeIterator preValues = iterator.Current.SelectChildren("preValue", ""); <ul> @while (preValues.MoveNext()) { string preValue = preValues.Current.Value; <li>@preValue</li> } </ul>
– Ginger Squirrel