| | |
how to set particular item as bold using Dropdownlist
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
try either or the codes below:
dropdown1.Items.FindByValue("0").Attributes.Add("style", "font-weight:bolder")
or
dropdown1.Items.FindByValue("0").Attributes.Add("style", "font-bold:true")
Let me know
dropdown1.Items.FindByValue("0").Attributes.Add("style", "font-weight:bolder")
or
dropdown1.Items.FindByValue("0").Attributes.Add("style", "font-bold:true")
Let me know
•
•
Join Date: Dec 2008
Posts: 104
Reputation:
Solved Threads: 18
ASP.NET Syntax (Toggle Plain Text)
<select> <option>Yes</option> <option style="background-color: yellow; font-weight:bold;">No</option> <option>Maybe So</option> </select>
This will work fine in Firefox but ie does not support it. An alternative will be to use the background-color property to highlight an option rather than making it bold.
Happy Programming
Last edited by peter_budo; Dec 17th, 2008 at 8:09 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
Other Threads in the ASP.NET Forum
- Previous Thread: Upload of a file in server using asp.net
- Next Thread: query about uploading a file
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu dynamically edit expose fill flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery listbox login menu microsoft mono mouse mssql multistepregistration news numerical objects opera order panelmasterpagebuttoncontrols radio ratings registration reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





