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>
&lt;MM<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>f runat="server" Expression='&lt;%# (DS_CRL.RecordCount &gt; 0) %&gt;'&gt;
&lt;ContentsTemplate&gt;
&lt;input type="radio" name="ID_Class" value='&lt;%# DS_CRL.FieldValue("ID_Class", Container) %&gt;' align="absmiddle"&gt;
&lt;%# DS_CRL.FieldValue("Name_Class", Container) %&gt;

&lt;/ContentsTemplate&gt;
&lt;/MM<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>f&gt;
&lt;/ItemTemplate&gt;
&lt;/ASP:Repeater&gt;



If I set the input checked,just the last radio checked.

I have try the code

&lt;%# (DS_CRL.FieldValue("ID_Class", Container) = 1) ? Response.Write("checked" : "" %&gt;

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 !

Reply to this topic