2012-04-19 78 views

回答

0

我最终改变了它的客户端。

   $(function() { 
         var capRateLabel = $('lblCapRate').next(); 
         if(capRateLabel) 
         { 
          capRateLabel.text('newtext'); 
         } 
       }) 
2

我不知道我是否理解你的问题。但一个RadioButton有一个Text属性。

RadioButton1.Text = "anytext"; 

编辑:如果你不是想改变单选按钮控件的标签,你可以(从复选框inherited)使用LabelAttributes属性。

例如:

RadioButton1.LabelAttributes.Add("onmouseover", "this.style.backgroundColor = 'red'"); 

RadioButton1.LabelAttributes.CssStyle.Add("text-decoration", "line-through"); 
+0

+1专打我一拳。 – 2012-04-19 21:19:50

+2

如果这就是答案......我会打我自己。 – 2012-04-19 21:22:41

2

只需通过Text属性:

MyRadioButton.Text = "My Radio Button"; 
1

这取决于你想改变标签的内容。您可以使用LabelAtttributes添加或删除属性,Text属性来更改文本等,但这就是它。

如果您需要更多,我会考虑建立自己的RadioButton控制;它确实不会那么困难,它会给你任何你需要的灵活性。