.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

BackColor for RadioButtonList

Posted By: Sun     Posted Date: November 11, 2010    Points:2   Category :ASP.Net
How to set background color for radiobutton list ,if it inside the contentPlace holder.



Responses
Author: Asha.MP             
Posted Date: November 11, 2010     Points: 5   

Hi..

you can set the background color by using the property BackColor="#FF3399" of the radiobutton list

<asp:RadioButtonList ID="RadioButtonList1" runat="server" BackColor="#FF3399">
<asp:ListItem>Asp.Net</asp:ListItem>
<asp:ListItem>Vb.Net</asp:ListItem>
<asp:ListItem>C#.Net</asp:ListItem>
<asp:ListItem>Ajax</asp:ListItem>
</asp:RadioButtonList>

Thanks and Regards,
Asha.mp
Author: Sun             
Posted Date: November 12, 2010     Points: 5   


When the radiobuttonlist is placed inside the content placeholder , not able to apply the backcolor using CSS,javascript ,attributes.

the following code which apply the color around the radiobutton only.Not the list item text.Hope you understood my requirement
input[type=radio]
{
background-clor:blue;
}

Author: Asha.MP             
Posted Date: November 12, 2010     Points: 5   

Hi..

If you want to change the color of the text, use forecolor as follows.
you can use backgroundcolor to set the backgroud color of the radiobutton list not the text.
Here i am using radiobutton list in contentplaseHolder itself,

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" ForeColor="Red" >
<asp:ListItem>aaaaa</asp:ListItem>
<asp:ListItem>bbbbb</asp:ListItem>
<asp:ListItem>ccccccc</asp:ListItem>
<asp:ListItem>eeeee</asp:ListItem>
</asp:RadioButtonList>
</asp:Content>

Please use this, this may help. if not tell me your requirement.

Thanks and Regards,
Asha.mp


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend