Search code examples
javascriptmaster-pagescontentplaceholder

How to call javascript function on the page load event of the child page which is in contentplaceholder?


I've asp.net web site , i used master page for the design. I've many child pages which are placed in the contentplaceholder. I want to call the javascript function on the page load event of the child page. And there are different javascript functions on each child page.

thanks


Solution

  • try creating a

    <script>
      (function yourFunc() {
      ....your code ....
      })();
    </script>
    

    in the child page and there you can use the function