2

Does anyone know why this isn't working? any source code changes would be great.

<% foreach (var i in Model.talentImages) { %>
                        <div style="padding:15px;">
                            <img src="<%: i.uri %>" width="95" height="84" alt="" style="float:left; padding:0px 20px 0px 0px" />
                            <div style="padding:30px 10px 10px 10px">
                               <%: Html.RadioButtonFor("group-" + i.uriId.ToString(), i.isApproved)%> Approved <br />
                               <%: Html.RadioButtonFor("group-" + i.uriId.ToString(), i.isApproved)%> Deny <br />
                            </div>
                            <hr width="0"/>
                            <%= Html.RadioButton("isProfileePicGroup", i.isProfilePic, false)%> Make Profile Picture <br />
                        </div>  
                        <hr />
                    <%} %>
4

2 回答 2

0

i排队

<img src="<%: ii.uri %>"

此外,Html.RadioButtonFor将 lambda 作为第一个参数。请参阅ASP.NET MVC 2 中的 RadioButtonFor

于 2010-11-05T21:23:20.683 回答
0

正如 Jakub 正确指出的那样,RadioButtonFor 采用 lambda 表达式,此外我还想指出一件事,所有单选按钮都应该具有相同的名称。否则它们不会相互排斥。

于 2012-05-11T17:18:56.157 回答