<tr class="tdbg">
            <td colspan="2">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <table width="100%" border="0" style="height: 176px">
                            <tr class="tdbg">
                                <td style="vertical-align: top" class="style3" align="right">
                                    文章阅读权限:
                                </td>
                                <td>
                                    <asp:RadioButtonList ID="rblReadstyle" runat="server" AutoPostBack="True" 
                                        OnSelectedIndexChanged="rblReadstyle_SelectedIndexChanged" 
                                        CausesValidation="True">
                                        <asp:ListItem Selected="True">所有人</asp:ListItem>
                                        <asp:ListItem>只限好友</asp:ListItem>
                                        <asp:ListItem>积分消费</asp:ListItem>
                                    </asp:RadioButtonList>
                                    <asp:TextBox ID="txtIntegralPay" runat="server" CssClass="inputtext"></asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tdbg">
                                <td class="style3" align="right" style="vertical-align: top">
                                    <asp:CheckBox ID="cbisComment" runat="server" Text="是否可以开设点评" AutoPostBack="True"
                                        OnCheckedChanged="cbisComment_CheckedChanged" CausesValidation="True" />
                                </td>
                                <td>
                                    <asp:RadioButtonList ID="rblComment" runat="server">
                                        <asp:ListItem Selected="True" Value="1">默认评论(好中差)</asp:ListItem>
                                        <asp:ListItem Value="2">留言式评论</asp:ListItem>
                                        <asp:ListItem Value="3">自定义评论</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>[
我想选中“积分消费”的时候,txtIntegralPay生效,否则失效;选中cbisComment,rblComment生效,否则失效!
但不管怎么设,点了之后都是没有反应,设断点看,执行的后台的点击事件,但控件就是没有效果!
望众大侠帮下小弟!

解决方案 »

  1.   

    选中“积分消费”的时候,txtIntegralPay生效,否则失效;选中cbisComment,rblComment生效,否则失效!
      

  2.   

     /// <summary>
            /// 如是积分消费,使积分输入框生效
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            protected void rblReadstyle_SelectedIndexChanged(object sender, EventArgs e)
            {
                if (readstylevalue == "积分消费")
                {
                    this.txtIntegralPay.Enabled= true;
                }
                else
                {
                    this.txtIntegralPay.Enabled = false;
                }
            }
            /// <summary>
            /// 选中开启评论,则评论列表框生效
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            protected void cbisComment_CheckedChanged(object sender, EventArgs e)
            {
                if (this.cbisComment.Checked)
                {
                    this.rblComment.Enabled = true;
                }
                else
                {
                    this.rblComment.Enabled = false;
                }
            }
      

  3.   

    if (rblReadstyle.SelectedItem.ToString() == "积分消费")
    .......其他看不出有什么错!!
      

  4.   

    楼主先把AJAX去掉试试!!
    看看是不是AJAX有问题!!
      

  5.   

    readstylevalue=rblReadstyle.SelectedItem.ToString(),这个之前写过了,断点调试的时候OK的呀,难道要睡一觉再运行!!
      

  6.   

    如果把updatepanel拿掉,一切正常,但要不刷新嘛,现在就是要放在updatepanel里面!
      

  7.   

      也许是前台的数据根本就没有POST到服务端
       你设置RadioButtonList 属性 AutoPostBack="True"    试试!! 
      

  8.   

    用IE浏览,点击RadioButtonList 出现这个
    Microsoft JScript 运行时错误: Sys.WebForms.PageRequestManagerServerErrorException: 不允许进行筛选。
      

  9.   

    没有scriptmanager这个 updatepanel直接报错的
      

  10.   

    UpdateMode="Conditional" 去掉看看,记得加了这个要调用update()方法的或是要设置Trigger属性的
      

  11.   

    问题基本找到了,不过不好解决,谢谢各位,我用了cuteeditor,主要是这个东西引起的,解决方法是把cuteeditor也放到updatepanel里面,不过这样就连cuteeditor也更新了,解决方法有待进一步更新!谢谢各位!参考网址:http://www.cnblogs.com/SAL2928/archive/2009/02/09/1386876.html
      

  12.   

     <Triggers>                                                                                  <asp:PostBackTrigger ControlID="rblReadstyle" />
    </Triggers>试一下;另:该功能为与用户交互的前台效果,建议使用js实现...