title: ScriptManager.RegisterStartupScript to fire javascript function in seperate javascript file after Page Load
body: <p>I have studied and tried 3 different solutions, but haven't been able to get past the annoying error : </p>
  
  <pre><code>Uncaught ReferenceError: SetupRichTextAndTags is not defined
  </code></pre>
  
  <p><strong>Situation :</strong> </p>
  
  <p>I am populating a hiddenfield with data (C# back-end), this is purely HTML which i will use to populate a SummerNote rich-text field by calling the following javascript : </p>
  
  <pre><code>$(".summernote").code("your text");
  </code></pre>
  
  <p><strong>My tries at RegisterStartupScript :</strong></p>
  
  <pre><code>//ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", "$(function () { SetupRichTextAndTags(); });", true);
  //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "&lt;script type='text/javascript'&gt;SetupRichTextAndTags();&lt;/script&gt;", false);
  ScriptManager.RegisterStartupScript(Page, GetType(), "SetupRichTextAndTags", "&lt;script&gt;SetupRichTextAndTags()&lt;/script&gt;", false);
  </code></pre>
  
  <p>All of these gives me the error...</p>
  
  <blockquote>
    <p>The script itself is within an included javascript file in the aspx
    page, and i think that might be the issue.. But.. i have not found any
    solutions to how to actually fix that..</p>
  </blockquote>
  
  <p>Any tips ? </p>