Re: Applying CSS to asp:ListItem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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?


.



Relevant Pages

  • Re: New Updates on Missing Students
    ... A missing Bishop Feehan High School graduate who disappeared on Valentine's Day was arrested early Thursday allegedly speeding on a Pennsylvania highway in a stolen motor vehicle. ... The vehicle was not the same vehicle he and his girlfriend, Amy Scott, 21, a Johnston and Wales student in Providence, drove off in in Providence after a reported fight the two had on Valentine's Day. ... Querzoli, a former Norton resident who graduated from Bishop Feehan in 2004, is being held in the Cumberland County Prison on $50,000 bail, Schmidhamer said. ...
    (alt.true-crime)
  • Re: Passing databetween user controls
    ... Thanks Scott. ... >>I use a template whereby my default page contains various user controls - ... >>With phContent ... >>Is their an easier way to do this without having to refresh the aspx page, ...
    (microsoft.public.dotnet.framework.aspnet)
  • [opensuse] 11.0 - SaX2 & TV Out
    ... refresh. ... Anyone know why NTSC TV is missing, or what should be selected instead? ... Also, which outputs on the the card are supposed to be primary & secondary, or is that configurable? ...
    (SuSE)
  • Re: refreshing after submitting a form
    ... paul wrote: ... > Is there a way to refresh a screen after submitting a form? ... > to not work right or maybe I'm just missing the logic somewhere: ...
    (alt.php)
  • Re: send keys macro solution to linking many txt files please...
    ... have a different structure (missing columns). ... on the refresh, then the transfer text solution (based on ... >> action Macro. ... when the final confirmation ...
    (microsoft.public.access.macros)