cjbeck71081
09-15-2006, 03:24 PM
I am editing an existing asp.net structure. This is how it works...
Upon opening the map titled "BiMap.aspx" this code is accessed.
<%@ Page language="c#" %>
<%@ Import Namespace="OSGeo.MapGuide" %>
<!-- #Include File="utilityfunctions.aspx" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<%
// Initialize a Aspx session and register a variable to hold the
// session id, then initialize the Web-Extensions, and connect
// to the site, and create a session.
String mapDefinition = "Library://BI/BI Map.MapDefinition";
String webLayout = "Library://BI/BIweb.WebLayout";
String sessionId = "";
try
{
//MapGuideApi.InitializeSockets();
InitializeWebTier();
MgUserInformation userInfo = new MgUserInformation("Anonymous", "");
MgSite site = new MgSite();
site.Open(userInfo);
sessionId = site.CreateSession();
//MapGuideApi.TerminateSockets();
}
catch (MgException mge)
{
Response.Write(mge.GetMessage());
Response.Write(mge.GetDetails());
//MapGuideApi.TerminateSockets();
}
%>
<%
<html>
<head>
<title>Block Island GIS</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<link href="styles/globalstyles.css" rel="stylesheet" type="text/css">
</head>
<frameset rows="150,*" frameborder="NO" border="0" framespacing="0">
<frame src="biborder.aspx?AppName=AJAX" name="TitleFrame" scrolling="NO" noresize>
<frame src="/mapguide/mapviewernet/ajaxviewer.aspx?SESSION=<%= sessionId %>&WEBLAYOUT=<%= webLayout %>" name="ViewerFrame">
<frame src="UntitledFrame-4"></frameset><noframes></noframes>
</html>
I accesses two framesets, one is a title frameset with some HTML in it, and the other is a compicated frameset with Asp information. The value it passes to get the application to function is the sessionID. It then passes that value over and over again, to each application to maintain the placement of the application.
What i would like to do is collect the sesionID and pass that to a new asp page, and use it to maintain the x & y location of the map, but on the new page, show completely differnt information. In order to do that, im pretty sure i need to pass the sessionID variable to the HTML frameset so when i click on the next say "Utility" page, i can then pass the variable to that page.
Here is a screenshot of the application. Any help is appreciated.
www.cbeckserver.com/viewer01.jpg
Thanks
Chris
Upon opening the map titled "BiMap.aspx" this code is accessed.
<%@ Page language="c#" %>
<%@ Import Namespace="OSGeo.MapGuide" %>
<!-- #Include File="utilityfunctions.aspx" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<%
// Initialize a Aspx session and register a variable to hold the
// session id, then initialize the Web-Extensions, and connect
// to the site, and create a session.
String mapDefinition = "Library://BI/BI Map.MapDefinition";
String webLayout = "Library://BI/BIweb.WebLayout";
String sessionId = "";
try
{
//MapGuideApi.InitializeSockets();
InitializeWebTier();
MgUserInformation userInfo = new MgUserInformation("Anonymous", "");
MgSite site = new MgSite();
site.Open(userInfo);
sessionId = site.CreateSession();
//MapGuideApi.TerminateSockets();
}
catch (MgException mge)
{
Response.Write(mge.GetMessage());
Response.Write(mge.GetDetails());
//MapGuideApi.TerminateSockets();
}
%>
<%
<html>
<head>
<title>Block Island GIS</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<link href="styles/globalstyles.css" rel="stylesheet" type="text/css">
</head>
<frameset rows="150,*" frameborder="NO" border="0" framespacing="0">
<frame src="biborder.aspx?AppName=AJAX" name="TitleFrame" scrolling="NO" noresize>
<frame src="/mapguide/mapviewernet/ajaxviewer.aspx?SESSION=<%= sessionId %>&WEBLAYOUT=<%= webLayout %>" name="ViewerFrame">
<frame src="UntitledFrame-4"></frameset><noframes></noframes>
</html>
I accesses two framesets, one is a title frameset with some HTML in it, and the other is a compicated frameset with Asp information. The value it passes to get the application to function is the sessionID. It then passes that value over and over again, to each application to maintain the placement of the application.
What i would like to do is collect the sesionID and pass that to a new asp page, and use it to maintain the x & y location of the map, but on the new page, show completely differnt information. In order to do that, im pretty sure i need to pass the sessionID variable to the HTML frameset so when i click on the next say "Utility" page, i can then pass the variable to that page.
Here is a screenshot of the application. Any help is appreciated.
www.cbeckserver.com/viewer01.jpg
Thanks
Chris