public RunRawJavaScriptOnClient ( string strSourceJavaScript, bool wrapTryCatch ) : void | ||
strSourceJavaScript | string | The JavaScript Code |
wrapTryCatch | bool | If true it will att a javascript try/catch block for the incomming code. |
Результат | void |
public void RunRawJavaScriptOnClient(string strSourceJavaScript, bool wrapTryCatch)
{
if (strSourceJavaScript.Length > 0)
{
if (wrapTryCatch == false)
{
ScriptBuilder(strSourceJavaScript);
}
else
{
ScriptBuilder("try {" + strSourceJavaScript + "}catch(anError){ dump(anError); alert(anError); }");
}
}
}