Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tarunjit 103 posts 146 karma points
    Jun 14, 2016 @ 11:53
    Tarunjit
    0

    Umbraco DropDown Data Type Property Value Fetching

    Hi All,

    We are facing issue while trying to fetch values from Umbraco page field which is using Drop Down List.

    Here is the Issue :-

    a. We have the dropdown with following PreValues filled "Buying", "Selling", "Owning".

    b. If we fetch this property value of published page through a class inherited from RenderMvcController class using CurrentPage.Properties method in that scenario we get value of the above mentioned property as text value such as "Buying" or "Selling" or "Owning" what ever user have selected in the page.

    c. How ever If we fetch this property value of unpublished page using ApplicationContext.Current.Services.ContentService.GetById(pageID).Properties then we get ID value and not the text value as mentioned above for the item selected in dropdown. e.g. If "Buying" is selected then we get "71" and not the "Buying" value for that property. Smilarly if "Selling "is selected then we get "72" and not the "Selling " value for that property. To fetch the text value we have to use umbraco.library.GetPreValueAsString(71)

    Please let us know how we could fetch the text value and not the ID value as we are getting in case of CurrentPage.Properties method as explained above.

    Please help me on this.

    Regards

    Tarunjit Singh

Please Sign in or register to post replies

Write your reply to:

Draft