Aug 14, 2014, 1:14 PM
[CLOSED] BackColor,ForeColor not work
i want to change the default radiobutton's text forecolor and backcolor,my test case is below , but not change anything.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="info.hdsoso.com.test.WebForm2" %>
<%@ Import Namespace="System.Drawing" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
private void LoadData()
{
rg.Items.Clear();
var radio = new Radio
{
FieldLabel = "radiolabel",
LabelAlign = LabelAlign.Right,
InputValue = "1",
CssClass = "hoverme",
};
radio.BackColor = Color.DeepSkyBlue;
radio.ForeColor = Color.White;
var radio1 = new Radio
{
FieldLabel = "radiolabel",
LabelAlign = LabelAlign.Right,
InputValue = "1",
CssClass = "hoverme",
};
rg.Items.Add(radio);
rg.Items.Add(radio1);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server"></ext:ResourceManager>
<ext:RadioGroup runat="server" ID="rg"></ext:RadioGroup>
</form>
</body>
</html>
Last edited by Daniil; Aug 22, 2014 at 11:13 AM.
Reason: [CLOSED]