为什么(c#)
public static void Alertbox(string stralert)
{
    Response.write("<script language='javascript'>" + stralert + "</script>");
}
不可以呢?

解决方案 »

  1.   

    C#严格区分大小写,Response.write应为 Response.Write
      

  2.   

    The type or namespace name 'Response' could not be found (are you missing a using directive or an assembly reference?)
      

  3.   

    The type or namespace name 'Response' could not be found (are you missing a using directive or an assembly reference?)哪个namespace没导入?
      

  4.   

    using System; 了啊!!!!!!!!!!
      

  5.   

    是 using System.Web.HttpResponse; 吗?
    怎么报
    pub.cs(10): A using namespace directive can only be applied to namespaces; 'System.Web.HttpResponse' is a class not a namespace
      

  6.   

    搞定

    http://community.csdn.net/Expert/topic/3172/3172618.xml?temp=.4206049
      

  7.   

    在这个namespaces下
    System.Web.UI你不要直接写Response.Write
    这样写 Page.Response.Write()
    应该可以,不要忘了加上面的namaspaces
    其实上面的两种写法都可以,只要你加了namespaces