I do so:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd";>

<script runat="server">
    protected string SessionId { get; set; }
    protected string WebLayout { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {
        //I do this only once in Application_Start:
        //
MapGuideApi.MgInitializeWebTier(@"C:\ProgramFiles\Autodesk\MapGuideEnterprise2010\WebServerExtensions\www\webconfig.ini");
        //...but if you're unsure, do it here...

        MgUserInformation userInfo = new MgUserInformation("Anonymous", "");
        MgSite site = new MgSite();
        site.Open(userInfo);

        SessionId = site.CreateSession();
        WebLayout = "Library://Samples/Layouts/DotNetSamples.WebLayout";
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml";>
<head id="Head1" runat="server">
    <title></title>
</head>
<frameset rows="0,*" border="0" framespacing="0">
  <frame />
  <frame src="/mapguide/mapviewernet/ajaxviewer.aspx?SESSION=<%= SessionId
%>&WEBLAYOUT=<%= WebLayout %>" name="ViewerFrame" />
</frameset>
</html>

Pietro Ianniello
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to