为什么(c#)
public static void Alertbox(string stralert)
{
Response.write("<script language='javascript'>" + stralert + "</script>");
}
不可以呢?
public static void Alertbox(string stralert)
{
Response.write("<script language='javascript'>" + stralert + "</script>");
}
不可以呢?
怎么报
pub.cs(10): A using namespace directive can only be applied to namespaces; 'System.Web.HttpResponse' is a class not a namespace
见
http://community.csdn.net/Expert/topic/3172/3172618.xml?temp=.4206049
System.Web.UI你不要直接写Response.Write
这样写 Page.Response.Write()
应该可以,不要忘了加上面的namaspaces
其实上面的两种写法都可以,只要你加了namespaces