在类里输出提示
StringBuilder sb = new StringBuilder();
sb.Append("<script language=""javascript""> "n");
sb.Append("alert(""" + str.Trim() + """); "n");
sb.Append("</script>");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
Page currentPage = HttpContext.Current.Handler as Page;
if (currentPage != null){
currentPage.RegisterStartupScript("hit", sb.ToString());
}