Forums
This topic is locked
(asp.net c#)how can I set the first radio checked?
Posted 13 Aug 2003 10:25:02
1
has voted
13 Aug 2003 10:25:02 Yeung KwokKwun ahgood posted:
CODE:<ASP:Repeater runat="server" DataSource='<%# DS_CRL.DefaultView %>'>
<ItemTemplate>
<MM<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>f runat="server" Expression='<%# (DS_CRL.RecordCount > 0) %>'>
<ContentsTemplate>
<input type="radio" name="ID_Class" value='<%# DS_CRL.FieldValue("ID_Class", Container) %>' align="absmiddle">
<%# DS_CRL.FieldValue("Name_Class", Container) %>
</ContentsTemplate>
</MM<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>f>
</ItemTemplate>
</ASP:Repeater>
If I set the input checked,just the last radio checked.
I have try the code
<%# (DS_CRL.FieldValue("ID_Class", Container) = 1) ? Response.Write("checked"

but it's no work,get error "The left-hand side of an assignment must be a variable, property or indexer"
How can I do?
Thank you !