hello,
i agree with deepthoughts but i think you also need to make the
dropdownlist enabled when the radionbuttonlist
item is unselected
change databound code and send radionbuttonlist item's client id also
like below
protected void RDBL1_DataBound(object sender, EventArgs e)
{
RDBL1.Items[0].Attributes.Add("onclick", "DisableDDL('" + ddl1.ClientID + "','" + RDBL1.Items[0].ClientID + "'"));
RDBL1.Items[1].Attributes.Add("onclick", "DisableDDL('" + ddl2.ClientID + "','" + RDBL1.Items[1].ClientID + "'));
}
if you need change the javacript function to
<script type="text/javascript">
function DisableDDL(ddlId,rblitemid)
{
if (document.getElementById(rblitemid).checked == true )
document.getElementById(ddlId).disabled = "disabled";
else
document.getElementById(ddlId).disabled = ! document.getElementById(ddlId).disabled;
}
</script>