I tried this code but is not working ..
protected void btnAbc_Click(object sender, EventArgs e)
{
string script = "<script language='javascript'>alert('abc');</script>";"
ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", script,true);
}
Pls advice.
You have double script tags. Add the script tags yourself:
Or let the method add it:
Not both.
Also consider if the
RegisterStartupScriptmethod is a better fit for what you want to do.