Dropdownlist values binded colorly in dynamically using framework 1.1

Posted by Ganeshsvelu under ASP.NET on 4/27/2010 | Views : 1352 | Status : [Member] | Replies : 3
I want dropdown values should be binded colourly with dynamically using framework asp.net1.1.It is possible or not?
If it is possible please give me a solution.


Please reply soon




Responses

Posted by: Sheonarayan on: 4/27/2010 [Administrator] HonoraryPlatinum

Up
0
Down
Please go through following links

http://www.c-sharpcorner.com/UploadFile/DipalChoksi/ColorFullDropDown11232005000942AM/ColorFullDropDown.aspx

http://www.codeproject.com/KB/aspnet/HtmlColorDropDown.aspx

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Ganeshsvelu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 4/28/2010 [Member] Bronze

Up
0
Down
<asp:DropDownList AutoPostBack="false" ID="a" runat="server">
<asp:ListItem Value="0" Text="<span class="css1">css1</span>" ></asp:ListItem>
<asp:ListItem Value="1" Text="<span class="css2">css2</span>" ></asp:ListItem>
<asp:ListItem Value="2" Text="<span class="css3">css3</span>" ></asp:ListItem>
<asp:ListItem Value="3" Text="<span class="css4">css4</span>" ></asp:ListItem>
</asp:DropDownList>


by defining the css u can specfiy different colour to the items of dropdownlist

Thanks
Pavan Kumar
Mark Answer if this fits the need

Ganeshsvelu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenmanam on: 4/29/2010 [Member] Starter

Up
0
Down
<script runat="server">

private void HtmlColorDropDown1_ColorChanged(object sender,
System.EventArgs e)
{
Label1.Text = HtmlColorDropDown1.SelectedColorName;
}
</script>
<html>
<head>
<title>Example</title>
</head>
<body>
<form runat="server">
<cc1:HtmlColorDropDown id="HtmlColorDropDown1" runat="server"
DisplaySelectColorItemText="--Select a Color--"
DisplaySelectColorItem="True"
AutoPostBack="True"
OnColorChanged="HtmlColorDropDown1_ColorChanged">
</cc1:HtmlColorDropDown>
<P>The selected color is: <asp:Label id="Label1" runat="server"/></P>
</form>
</body>
</html>


NaveenKumar

Ganeshsvelu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response