Check_Changed方法没有被击中? [英] Check_Changed method not getting hit?

查看:60
本文介绍了Check_Changed方法没有被击中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个复选框选中,但check_changed方法在不触发
这是复选框属性

Hi
I have one checkBox that populates a textbox when checked but the check_changed method is not firing

here''s the checkbox properties

<asp:CheckBox ID="chkFinish" runat="server" 
                                            oncheckedchanged="chkFinish_CheckedChanged" Text="Finish" />




这是Check_changed方法




Here''s the Check_changed method

protected void chkFinish_CheckedChanged(object sender, EventArgs e)
        {
            if (chkFinish.Checked)
            { txtPrice.Text = Convert.ToString(ProdFPrice); }
            else
            { txtPrice.Text = Convert.ToString(ProdPrice); }
            
        }




预先感谢您




Thank u in advance

推荐答案

尝试:
<asp:checkbox id="chkFinish" runat="server" oncheckedchanged="chkFinish_CheckedChanged" text="Finish" autopostback="True" xmlns:asp="#unknown" />


将autopostback属性更改为true复选框,则事件将触发.
Change the autopostback property to true for your checkbox and the evnt will fire.


这篇关于Check_Changed方法没有被击中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆