简体   繁体   English

ASP单选按钮错误

[英]Asp Radiobutton error

I would like the Id correspond to the data in the dataitem so that I know on which radiobutton the user clicked: I write: 我希望ID与数据项中的数据相对应,以便知道用户单击了哪个单选按钮:我写道:

<asp:RadioButton ID="<%# DataBinder.Eval(Container.DataItem, "IdFlight") %> " runat="server" GroupName="Flights" />

But I get error of parser: the format of the tag is not correct. 但是我得到了解析器错误:标签的格式不正确。 Any hint please? 有什么提示吗?

You can use HTML Input Radio instead of ASP.net Radio. 您可以使用HTML Input Radio代替ASP.net Radio。 and write jquery function what you want. 并编写所需的jquery函数。

<input type="radio" id="<%# DataBinder.Eval(Container.DataItem, "blog_id") %> "/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM