Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
this is my code.

XML
<%= Html.DropDownList(ViewData["DDLName"].ToString(), Model) %>
   <% foreach (var status in Model)
      {
          if (status.Text.Equals("Cancelled"))
          {
                ....... coding...
          }
      } %>



how can I change it?
I tried that..
C#
if (status.Text.Equals(&quot;Cancelled&quot;))
 {
     status.Text = "<font color="red">"+status.Text+"</font>"
}


didn't work...-_-

please help..
Posted
Comments
Sreejith Gopinathan 4-Mar-11 20:13pm    
I think not all browsers support style property/child elements in select option

1 solution

This Link[^] may help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900