using System; using System.Data; using System.Data.SqlClient; using System.Web;public class ShortList { public DataView SearchNo(string CustomerName ,out int NoResultAmount) { DataSet objDataSet= new DataSet(); objDataSet.ReadXmlSchema(Server.MapPath("ShortList.xsd")); objDataSet.ReadXml(Server.MapPath("ShortList.xml")); DataView objNoView = new DataView(objDataSet.Tables["Item"]); objNoView.RowFilter="BookId=0"; NoResultAmount = objNoView.Count; return objNoView; } public ShortList() { } } 编译时出错:D:\BookStore\BookStoreClassLibrary\ShortList.cs(21): The type or namespace name 'Server' could not be found (are you missing a using directive or an assembly reference?)
能告诉我Server类完整的命名空间吗?
using System.Data;
using System.Data.SqlClient;
using System.Web;public class ShortList
{
public DataView SearchNo(string CustomerName ,out int NoResultAmount)
{
DataSet objDataSet= new DataSet();
objDataSet.ReadXmlSchema(Server.MapPath("ShortList.xsd"));
objDataSet.ReadXml(Server.MapPath("ShortList.xml")); DataView objNoView = new DataView(objDataSet.Tables["Item"]);
objNoView.RowFilter="BookId=0"; NoResultAmount = objNoView.Count;
return objNoView;
}
public ShortList()
{
}
}
编译时出错:D:\BookStore\BookStoreClassLibrary\ShortList.cs(21): The type or namespace name 'Server' could not be found (are you missing a using directive or an assembly reference?)
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemWebHttpContextMembersTopic.htm