Session对象


存储字符串:Session["name"] = name.Text;
取字符串:string name = (string)adfMap.Page.Session["name"];

存储类对象:
            IServerContext serverContext;
            ESRI.ArcGIS.ADF.Identity identity = new Identity("Administrator", "1", "serve");
            ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection agsconnection;
            agsconnection = new AGSServerConnection("serve", identity);
            agsconnection.Connect();

            ESRI.ArcGIS.Server.IServerObjectManager som = agsconnection.ServerObjectManager;
            serverContext = som.CreateServerContext("SDEzzmap", "MapServer");

            Session["serverContext"] = serverContext;
取类对象:serverContext = (IServerContext)adfMap.Page.Session["serverContext"];

posted @ 2009-08-05 17:19  MYGIS_3  阅读(144)  评论(0)    收藏  举报