你说的是HttpContext类吧!
System.Web 命名空间

解决方案 »

  1.   

    哦,我写错了,是HttpContext
    能告诉我Server类完整的命名空间吗?
      

  2.   

    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?)
      

  3.   

    参考
    ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemWebHttpContextMembersTopic.htm