Re: Applying CSS to asp:ListItem
- From: "Merennulli" <maross@xxxxxxxxxxxxxxxx>
- Date: 18 Aug 2006 11:13:45 -0700
Is there a step I'm missing? I put this in the page_load, but no
attributes get added. I even tried adding other attributes, a refresh,
etc.
Scott M. wrote:
In your Page_Load...
ddLimit.Items(0).attributes.add("Class","className")
ddLimit.Items(1).attributes.add("Class","className")
ddLimit.Items(2).attributes.add("Class","className")
"Merennulli" <maross@xxxxxxxxxxxxxxxx> wrote in message
news:1155070770.267595.211740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
My problem child:
<asp:dropdownlist id="ddlLimit" tabIndex="6" runat="server"
EnableViewState="False" CssClass="query">
<asp:ListItem Value="100" Selected="True">100</asp:ListItem>
<asp:ListItem Value="250">250</asp:ListItem>
<asp:ListItem Value="500">500</asp:ListItem>
</asp:dropdownlist>
My intent is to make this a gradiation of colors from blue to red,
giving 100 a natural "positive" feel and 500 a natural "negative" feel.
100 gives the top 100 results, while 500 gives the top 500, and of
course takes about 4x as long. I'm trying to encourage leaving it on
the 100 without being obtrusive.
The problem is, CssClass=, Class= and ID= don't get passed with
asp:listitem. I need to either find a CSS method of referencing them
individually, or an ASP.NET way of passing an identifier or class with
them. Any ideas?
.
- References:
- Applying CSS to asp:ListItem
- From: Merennulli
- Re: Applying CSS to asp:ListItem
- From: Scott M.
- Applying CSS to asp:ListItem
- Prev by Date: Re: PropertyGrid
- Next by Date: Re: Correction
- Previous by thread: Re: Applying CSS to asp:ListItem
- Next by thread: state of the table (still editing or not)
- Index(es):
Relevant Pages
|