In ASP.NET C#, I want to show an ALERT(\'HI\') from codebehind of a UserControl but doesn\'t work:
User Control:
there may be below possible reasons try to change these and check it works or not
1). ScriptManager.RegisterStartupScript(this, this.GetType(), "msg", "alert('hi!')", true);//no need to use javascript with alert when bool set to true
2). ScriptManager.RegisterStartupScript(page, page.GetType(), "msg", "alert('hi!')", true);
3). ClientScript.RegisterClientScriptBlock(GetType(), "sas", "", true);