Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP.net VB how to change radio button text color

Posted on 2011-02-22
2
Medium Priority
?
1,033 Views
Last Modified: 2012-05-11
I have a radio button list in ASP.NET using VB. Would like to change the font color of one of the list items. For instance, how do I make the text "Green Suggestion" to be the color green when it is rendered?

 <asp:RadioButtonList ID="radioAct" runat="server" AutoPostBack="True"
                       
          RepeatDirection="Vertical" Width="609px">
          <asp:ListItem Value="Environmental Issue<">Environmental Issue</asp:ListItem>
          <asp:ListItem Value="General Safety">General Safety Suggestion</asp:ListItem>
          <asp:ListItem Value="Green Suggestion">Green Suggestion</asp:ListItem>
          <asp:ListItem Value="Near Miss/Accident">Near Miss/Accident</asp:ListItem>
          <asp:ListItem Value="Unsafe Act/Behavior">Unsafe Act/Behavior</asp:ListItem>
          <asp:ListItem Value="Unsafe Condition">Unsafe Condition</asp:ListItem>
</asp:RadioButtonList>
0
Comment
Question by:neptuneit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Expert Comment

by:Daniel Van Der Werken
ID: 34955862
This will work:
<asp:ListItem Value="Green Suggestion"><span style="color: Green;">Green Suggestion</span></asp:ListItem>
0
 
LVL 8

Accepted Solution

by:
Den_HBR earned 2000 total points
ID: 34955898
<asp:RadioButtonList ID="radioAct" runat="server" AutoPostBack="True" RepeatDirection="Vertical" Width="609px" >
          <asp:ListItem Value="Environmental Issue<">Environmental Issue</asp:ListItem>
          <asp:ListItem Value="General Safety" >General Safety Suggestion</asp:ListItem>
          <asp:ListItem Value="Green Suggestion" style="color: green">Green Suggestion</asp:ListItem>
          <asp:ListItem Value="Near Miss/Accident">Near Miss/Accident</asp:ListItem>
          <asp:ListItem Value="Unsafe Act/Behavior">Unsafe Act/Behavior</asp:ListItem>
          <asp:ListItem Value="Unsafe Condition">Unsafe Condition</asp:ListItem>
</asp:RadioButtonList>
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question