I have a behindcode javascript. it is to show a javascript dialog box.
however, it keep show this error
The name \'ClientScript\' does not exist in
For cs file the sample is;
ClientScript.RegisterClientScriptBlock(this.GetType(), "{some text for type}", "alert('{Text come to here}'); ", true);
for masterpage cs the sample is;
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "{some text for type}", "alert('{Text come to here}'); ", true);
Try:
Page.ClientScript
instead to see if it makes a difference.
On the master page try ScriptManager.RegisterStartupScript()
instead. Watch out, the signature slightly differs from Page.ClientScript.RegisterClientScriptBlock()
.