Try this code
In code behind
protected void Page_Load(object sender, EventArgs e)
{
foreach (ListItem item in AllowencesCheckbox.Items)
{
if (item.Value == "1")
{
item.Attributes.Add("onchange", "Display(document.activeElement.checked);");
}
}
}
In design
<script type="text/javascript" language="javascript">
function Display(val) {
var objDDL = document.getElementById('<%= MileageRateDropDownList.ClientID %>');
if (val == false) {
objDDL.style.display = "none";
objDDL.style.visibility = "hidden";
}
else {
objDDL.style.display = "block";
objDDL.style.visibility = "visible";
}
}
</script>
<asp:checkboxlist id="AllowencesCheckbox" runat="server" autopostback="false" xmlns:asp="#unknown">
<asp:listitem text="hi" value="1"></asp:listitem>
<asp:listitem text="hello" value="2"></asp:listitem>
</asp:checkboxlist>
<asp:dropdownlist id="MileageRateDropDownList" runat="server" xmlns:asp="#unknown">
</asp:dropdownlist>