Reputation: 681
I want to write javascript from code behind but at the end of my HTML document.
With Response.Write
, I can write at the beginning of the file but how can I write at the end or in an other place ?
Thanks for your help !
Upvotes: 0
Views: 985
Reputation: 1115
Write your JS function at the bottom of the HTML document, then just call it in the page load event in code behind file with
ClientScript.RegisterStartupScript(GetType(), "Javascript", "javascript:someFunction();", true);
Upvotes: 1