Suppose i have created one .js file name as: MyNoteBook.js. In this .js file i have written function as name count().
Now I am creating MyNoteBook.aspx page in asp.net. On the event of pageload of .aspx file, i want to call that count() function of that .js file. Is it is possible, If yes then please tell me.
If no, then how i can write count function in .aspx page?
To call a JS function on page load, make sure there is an
onLoadattribute on thebodytag that calls it:This all happens client side, as Javascript runs in the browser.
You can’t call a client side function from server side code.
As for writing the function server side – without knowing what it does, no one can tell you how to convert it to server side code.