Hi Bhavesh23,
Please refer below sample.
HTML
<asp:DropDownList runat="server" ID="ddlDetails" AutoPostBack="true"
OnSelectedIndexChanged="ddlDetails_SelectedIndexChanged">
<asp:ListItem Text="Select" />
<asp:ListItem Text="1 To 10" Value="1 To 10" />
<asp:ListItem Text="11 to 20" Value="11 to 20" />
<asp:ListItem Text="21 To 30" Value="21 To 30" />
</asp:DropDownList>
<hr />
<asp:CheckBoxList runat="server" ID="chkDetails">
<asp:ListItem Text="1" Value="1" Enabled="false" />
<asp:ListItem Text="2" Value="2" Enabled="false" />
<asp:ListItem Text="3" Value="3" Enabled="false" />
<asp:ListItem Text="4" Value="4" Enabled="false" />
<asp:ListItem Text="5" Value="5" Enabled="false" />
<asp:ListItem Text="6" Value="6" Enabled="false" />
<asp:ListItem Text="7" Value="7" Enabled="false" />
<asp:ListItem Text="8" Value="8" Enabled="false" />
<asp:ListItem Text="9" Value="9" Enabled="false" />
<asp:ListItem Text="10" Value="10" Enabled="false" />
<asp:ListItem Text="11" Value="11" Enabled="false" />
<asp:ListItem Text="12" Value="12" Enabled="false" />
<asp:ListItem Text="13" Value="13" Enabled="false" />
<asp:ListItem Text="14" Value="14" Enabled="false" />
<asp:ListItem Text="15" Value="15" Enabled="false" />
<asp:ListItem Text="16" Value="16" Enabled="false" />
<asp:ListItem Text="17" Value="17" Enabled="false" />
<asp:ListItem Text="18" Value="18" Enabled="false" />
<asp:ListItem Text="19" Value="19" Enabled="false" />
<asp:ListItem Text="20" Value="20" Enabled="false" />
<asp:ListItem Text="21" Value="21" Enabled="false" />
<asp:ListItem Text="22" Value="22" Enabled="false" />
<asp:ListItem Text="23" Value="23" Enabled="false" />
<asp:ListItem Text="24" Value="24" Enabled="false" />
<asp:ListItem Text="25" Value="25" Enabled="false" />
<asp:ListItem Text="26" Value="26" Enabled="false" />
<asp:ListItem Text="27" Value="27" Enabled="false" />
<asp:ListItem Text="28" Value="28" Enabled="false" />
<asp:ListItem Text="29" Value="29" Enabled="false" />
<asp:ListItem Text="30" Value="30" Enabled="false" />
</asp:CheckBoxList>
Code
C#
protected void ddlDetails_SelectedIndexChanged(object sender, EventArgs e)
{
int start = Convert.ToInt16(ddlDetails.SelectedValue.ToLower().Split(new string[] { "to" }, StringSplitOptions.None)[0].Trim());
int end = Convert.ToInt16(ddlDetails.SelectedValue.ToLower().Split(new string[] { "to" }, StringSplitOptions.None)[1].Trim());
foreach (ListItem item in chkDetails.Items)
{
item.Enabled = Convert.ToInt16(item.Text) >= start && Convert.ToInt16(item.Text) <= end ? true : false;
}
}
VB.Net
Protected Sub ddlDetails_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim start As Integer = Convert.ToInt16(ddlDetails.SelectedValue.ToLower().Split(New String() {"to"}, StringSplitOptions.None)(0).Trim())
Dim [end] As Integer = Convert.ToInt16(ddlDetails.SelectedValue.ToLower().Split(New String() {"to"}, StringSplitOptions.None)(1).Trim())
For Each item As ListItem In chkDetails.Items
item.Enabled = If(Convert.ToInt16(item.Text) >= start AndAlso Convert.ToInt16(item.Text) <= [end], True, False)
Next
End Sub
Screenshot