简体   繁体   中英

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:

<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. and write jquery function what you want.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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