Hi Ranjith,
Please try this.!
foreach ( ListItem item in dropdownlist.Items )
{
if (
{
item.Attributes.Add( "disabled", "disabled" );
}
}
or
dropdownlist.Items[0].Attributes.Add("disabled", "disabled");
If not the above, please do try the below one.
item.Enabled = false;
Personally, I've not checked it but should work fine. Let me know if you have any issues. I've provided "disable using attributes" and "Enable" options. Please test it for yourself with both options and use the best one that suits your application.
Thank you,
RelicV