stevenk140
Programmer
How would I create a javascript function dynamically on PageLoad?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
in PageLoad:
stirng script = "<script language=javascript>";
script += "function myFunction(){";
script += "alert('test');}";
script += "</script>";
if(!Page.IsClientScriptBlockRegistered("myfunction"))
{
Page.RegisterClientScriptBlock("myfunction", script);
}