ClientScript Not Working Properly On Class C#
I want to deploy a script on C# which usually uses methods like: ClientScript.RegisterStartupScript(GetType(), 'script', 'Details('' + hdnId.Value + '');', true); However I wanted
Solution 1:
I have this function, and it always works, try it
public static void callJavascriptFunction(string strScript)
{
if (HttpContext.Current == null && HttpContext.Current.Handler is Page) { return; }
Page currentPage = (Page)HttpContext.Current.Handler;
ScriptManager.RegisterStartupScript(currentPage,
currentPage.GetType(),
"Funct",
strScript,
true);
}
Post a Comment for "ClientScript Not Working Properly On Class C#"