Hi
Arun,
Updated Answer is:
document.getElementById(Read).style.display = visible ;
document.getElementById(Write).style.display = visible ;
This is complete solution:
write in .cs file
protected void dList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
CheckBox chkPermission = (CheckBox)e.Item.FindControl("cboxPermission1");
CheckBox chkRead = (CheckBox)e.Item.FindControl("cboxPermission2");
CheckBox chkWrite = (CheckBox)e.Item.FindControl("cboxPermission3");
chkPermission.Attributes.Add("onclick", "showhideReadWrite(this,'" + chkRead.ClientID + "','" + chkWrite.ClientID + "');");
}
write in .aspx file between <head></head> tag
<head>
<script language="javascript" type="text/javascript">
function showhideReadWrite(_this, Read, Write) {
var visible = (_this.checked) ? '' : 'none';
document.getElementById(Read).style.display = visible ;
document.getElementById(Write).style.display = visible ;
}
</script>
</head>
Please do let me know, if you have any doubt.
Please provide "
Vote":thumbsup: if this would be helpful, and make "
Accept Answer" if this would be correct answer.:rose:
Thanks,
Imdadhusen