G
Guest
here is the html :
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="<%=LABEL_WIDTH%>" class="formtext"><%= HTEXT("Connection
type:")%></td>
<td class="formtext">
<input type="radio" class="inputRadio" id="dbStatus" name="dbStatus"
value="1" onclick="changeDbStatus(1)" <%if dbStatus=1 then%> checked
<%end if%>><%= HTEXT("Control Server") %>
<input type="radio" class="inputRadio" id="dbStatus" name="dbStatus"
value="0" onclick="changeDbStatus(1)" <%if dbStatus=0 then%> checked
<%end if%>><%= HTEXT("Historical Database") %>
</td>
</tr>
</table>
here is the error :
Another object on this page already uses ID 'dbstatus'
with squiggles under both occurrences of dbstatus .
Here is my colleague's take :
In classic HTML, this is very legal and common. The radio button that is
selected is the only one that posts back to the server. Its named value,
either 0 or 1, is sent back.
Even the duplicate id attributes are valid, as Jscript will just see an
array of two <input> objects, not just a non-array of one object.
So, what is the way to do this same thing in ASPX?
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="<%=LABEL_WIDTH%>" class="formtext"><%= HTEXT("Connection
type:")%></td>
<td class="formtext">
<input type="radio" class="inputRadio" id="dbStatus" name="dbStatus"
value="1" onclick="changeDbStatus(1)" <%if dbStatus=1 then%> checked
<%end if%>><%= HTEXT("Control Server") %>
<input type="radio" class="inputRadio" id="dbStatus" name="dbStatus"
value="0" onclick="changeDbStatus(1)" <%if dbStatus=0 then%> checked
<%end if%>><%= HTEXT("Historical Database") %>
</td>
</tr>
</table>
here is the error :
Another object on this page already uses ID 'dbstatus'
with squiggles under both occurrences of dbstatus .
Here is my colleague's take :
In classic HTML, this is very legal and common. The radio button that is
selected is the only one that posts back to the server. Its named value,
either 0 or 1, is sent back.
Even the duplicate id attributes are valid, as Jscript will just see an
array of two <input> objects, not just a non-array of one object.
So, what is the way to do this same thing in ASPX?