Copied to clipboard

Flag this post as spam?

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


  • Kevin John 8 posts 28 karma points
    Oct 23, 2012 @ 18:54
    Kevin John
    0

    Get text value from radiobutton list in Razor?

    Hi. I have created a new data type of type radiobutton list with these options:

    TEXT                VALUE
    Manual                6  
    Automatic            7

    I want to show the Text in my Template.  I have added this data type to my document type with an alias of "vehicleInStockTransmission".  It shows that you can select either 'Manual' or 'Automatic'.

    However when I include the following in my Template, I get the Value (e.g. '6') and not the Text (e.g. 'Manual') from this radio button list:

    <umbraco:Item field="vehicleInStockTransmission" runat="server" />

    Using razor how I can I show the Text?

    Thanks in advance.

     

    PS On another point where is the documentation for basic practical examples like this?  I have watched the videos (but you can't really reference those easily) , and looked at the Razor snippets section. There are some good examples,  but it all seems very light on good practical and detailed examples?  Or am I missing something? :)

     

Please Sign in or register to post replies

Write your reply to:

Draft