I have a dropdownlist to fill in server-side an some of the options that will filled to the this list need to be disabled. Practically I know that I need to add a disabled='disabled' attribute.
That is the first way I tried.
Dim avListItems = activityVersions.Select(Function(av) New With {.Text = av.Text, .Value = av.Value, .Disabled=av.HasQuota}).ToList()
But this disables all options because in HTML disabled attribute do not need a value if there is a disabled attribute then it disables the option in any case. But I need a solution which could add disabled attribute for the options, which has no quota and other should be enabled.
Do you have any suggestion?