百度了一下说是因为没有加入System.Web,我已经在项目里添加引用了,但还是这样,求高人指点

解决方案 »

  1.   

    public class WebChat
        {
           public static void Show(string Message)
           {
               HttpContext.Current.Response.Write("<script language='javascript' type='text/javascript'>alert('" + Message + "')</script>");
               HttpContext.Current.Response.Write("<script>history.go(-1)</script>");
               HttpContext.Current.Response.End();
           }
           public static void Show(string Message, string Src)
           {
               HttpContext.Current.Response.Write("<script language='javascript' type='text/javascript'>alert('" + Message + "');location.href='" + Src + "'</script>");
               HttpContext.Current.Response.End();
           }
    这是代码