C#中关于updatePanel与freeTextBox不兼容的问题 当页面刷子新后,ftb不能输入内容的解决办法

来源:互联网 发布:歼20鸭翼布局利弊知乎 编辑:程序博客网 时间:2024/04/28 01:59

C#中关于updatePanel与freeTextBox不兼容的问题  

如何解决呢个问题?

解决方案

在使用freeTextBox的那个页面(当然那个页面时有updatePanel的前提下)的后台代码中加入这两个方法:

public new void RegisterOnSubmitStatement(string key, string script)
    {
        ScriptManager.RegisterOnSubmitStatement(this, typeof(Page), key, script);
    }

 

[Obsolete]
    public override void RegisterStartupScript(string key, string script)
    {
        string newScript = script.Replace("FTB_AddEvent(window,'load',function () {", "").Replace("});", "");
        ScriptManager.RegisterStartupScript(this, typeof(Page), key, newScript, false);
    }

 

这样就可以解决问题~~

原创粉丝点击