开发者

How to bind bool? to RadioButton in ASP.net

I don't know how to bind nullable bo开发者_如何学Colean field to RadioButton in ASP.net.

Following code works well for non-nullable field

<asp:RadioButton ID="rbStatus" runat="server" Text="Accepted" Checked='<%# Bind("Status") %>' />

Can you tell me how I can bind nullable boolean field to RadioButton?

Thanks in advance


That's impossible, unfortunately you can use the Bind() syntax only on non-nullable values. Bind is fairly limited in what it accepts for arguments. Unlike DataBinder.Eval which is simply a method call.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜