B
Ben
Hi,
i would like to have an explanation about this:
This works, but i get the message in code-behind:
access of shared member,... or nested type through an instance; qualifying
expression will not be evaluated.
Dim cl As System.Drawing.Color
Label1.ForeColor = cl.FromName(DropDownList1.SelectedValue)
<aspropDownList ID="DropDownList1" runat="server" AutoPostBack=true>
<asp:ListItem Text="red" Value="red"></asp:ListItem>
By the way, i know that there is another solution:
System.Drawing.Color.Fromname(DropDownList1.SelectedValue).
Thanks
Ben
i would like to have an explanation about this:
This works, but i get the message in code-behind:
access of shared member,... or nested type through an instance; qualifying
expression will not be evaluated.
Dim cl As System.Drawing.Color
Label1.ForeColor = cl.FromName(DropDownList1.SelectedValue)
<aspropDownList ID="DropDownList1" runat="server" AutoPostBack=true>
<asp:ListItem Text="red" Value="red"></asp:ListItem>
By the way, i know that there is another solution:
System.Drawing.Color.Fromname(DropDownList1.SelectedValue).
Thanks
Ben