| | |
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 activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net box browser button c# cac checkbox click commonfunctions control css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownlist dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iframe iis javascript listbox login microsoft mono mouse mssql multistepregistration news novell numerical objects opera panelmasterpagebuttoncontrols radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





