i used in this below code in usercontrol
but error happen
because the checkbox value didn't pass
please help how to pass the checkbox value
i try <!--onclick="checkedChanged(this,'checkbox')--> this line
but the checkbox is runat=server
so different value is generated in html view source code...
so doesn't work this code...........
function checkedChanged(PanelId,ChkID)
{
if(ChkID.checked == true)
{
PanelId.style.backgroundColor="Yellow";
return true;
}
if(ChkID.checked == false)
{
PanelId.style.backgroundColor="YellowGreen";
}
return false;
}
<div id="Panel1" style="WIDTH: 64px; HEIGHT: 48px; BACKGROUND-COLOR: yellowgreen" onclick="checkedChanged(this,checkbox) runat="server">
<img id="imgcolor" style="WIDTH: 32px; HEIGHT: 31px" height="31" src="file:///\\system107\HIS\Images\seat2.jpg"
width="32" align="middle" runat="server">
<input type="checkbox" id="Checkbox1" name="Checkbox1" runat="server">
<label id="Label1" runat="server"></label>
</div>