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"];

浙公网安备 33010602011771号