i have a scenario where i have to add separators in DropDownList in asp.net. Please, suggest.
you can use disabled items as separators
example:
ListItem separator = new ListItem("---element---", "");
separator.Attributes.Add("disabled", "true");
ddltest.Items.Add(separator);
Just add like this:
<asp:ListItem disabled>-------------</asp:ListItem>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With