|
Hi,
I want to run a code everytime the page is loaded.
so everytime the user view the page. I would run a code that will log some data or do something.
One way is to insert the function in the Page_Load(), but I don't want to put it on every page.
Is this possible?
Thanks
|
|
|
You're posting in the C++ forum, but I suspect you're writing C# ASP.NET code. Is the right?
If so, look at the Page.RegisterStartupScript() method, to assign a JavaScript function to run client-side when the page loads.
Of course, you could just as easily do this with the JavaScript onload event handler in the body tag.
|
|
|
|
|
|
|
|
|
// |