Hello,
Try writing ShowAlert() method without script tag as below :
public static string ShowAlert(string pHeader, string pMessage)
{
StringBuilder sb = new StringBuilder();
sb.Append("example1('" + pHeader + "','" + pMessage + "');");
return sb.ToString();
}