Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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
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.
is working on a reply...