FreeTextBox富文本編輯在Updatepanel裡面一直沒成功,公司最近又要求這個功能一定要實作。。。沒辦法,隻能想辦法,還好終于找到方法了,在此記錄一下備用。
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);
}