In ASP.NET we are calling defined js-functions with the:
Page.ClientScript.RegisterStartupScript(GetType(), "", "JSFuncNameHere();", true);
I wonder:
- Why there isn't any method, which has a name like: Page.ClientScript.CallJSScript("someJSFunc");
- Why does the upper-method require the reflection method GetType() ? Something isn't defined at runtime, is it?
- Why do I need the 2nd argument
key? As I have tested, I can left it empty and the existed JS-function shall be called.