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 to make a class that runs that code: public class WebUtilities { public static void CustomScript(Page objPage, string strScript) { objPage.ClientScript.RegisterStartupScript(objPage.GetType(), "script", strScript, true); } } When I call WebUtilities.CustomScript, sometimes it works, but leaves a //]]> at the bottom