c# and javascript functions
.NET (Core and Framework)
2
Posts
2
Posters
0
Views
1
Watching
-
You can't. The javascript function doesn't exist until the page is loaded in the browser. If you want the function to run as soon as the page loads, you can add a call in the onload property in the body tag, or add a script tag to the page:
Page.RegisterStartupScript("Description", "<script type=\"text/javascript\">theFunction();</script>");
--- b { font-weight: normal; }