私は3つの異なる解決策を研究して試しましたが、迷惑なエラーを乗り越えることができませんでした:
Uncaught ReferenceError: SetupRichTextAndTags is not defined
状況 :
隠しフィールドにデータを入力しています (C# バックエンド)。これは純粋に HTML であり、次の JavaScript を呼び出して SummerNote リッチテキスト フィールドに入力するために使用します。
$(".summernote").code("your text");
RegisterStartupScript での私の試み:
//ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", "$(function () { SetupRichTextAndTags(); });", true);
//ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>SetupRichTextAndTags();</script>", false);
ScriptManager.RegisterStartupScript(Page, GetType(), "SetupRichTextAndTags", "<script>SetupRichTextAndTags()</script>", false);
これらはすべて私にエラーを与えます...
スクリプト自体は aspx ページに含まれている javascript ファイル内にあり、それが問題である可能性があると思います..しかし..実際にそれを修正する方法の解決策が見つかりません..
任意のヒント ?