Copied to clipboard

Flag this post as spam?

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


  • Jamie Wu 19 posts 79 karma points
    Aug 02, 2011 @ 17:27
    Jamie Wu
    0

    Radiobutton list in razor

    Hi, I am having a problem to get the values from Radiobutton list. I defined a customized radiobutton list with prevalue 95, 96, 98. 

    How can I get these prevalues in razor? Are the 95, 96 and 98 integer or string?

    I am using @Model.radioAlias == '95', but it doesn't like it. 

    Thanks 

     

  • Rajeev 126 posts 154 karma points
    Aug 03, 2011 @ 02:47
    Rajeev
    0

    It will be integer if you use @Model.radioAlias.  Umbraco automatically convert items to similar formats.Otherwise you can get the values by @Model.GetProperty("radioAlias") Or @Model.radioAlias.ToString() to check with string. Hope this helps.

Please Sign in or register to post replies

Write your reply to:

Draft