[mapguide-users] aspx code behind

staniz ustazin at yahoo.com
Sun Feb 15 15:10:27 EST 2009


Thanks for all advices. It's working now, I used iframe instead of using
frame and instantiate webLayout and sessionID out of protected void
Page_Load(object sender, EventArgs e) {}

protected  String webLayout = "Library://DevTV/HelloWorld.WebLayout";
protected  String sessionId = "";
    protected void Page_Load(object sender, EventArgs e)
    {
    }


staniz.


staniz wrote:
> 
> I am trying to make default.aspx with code behind.
> Can sameone helps to provide information of code behind with Mapguide API? 
> 
> 
> default.aspx.cs
> using OSGeo.MapGuide;
> 
> public partial class Default2 : System.Web.UI.Page
> {
>     protected void Page_Load(object sender, EventArgs e)
>     {
>         MapGuideApi.MgInitializeWebTier(@"C:\Program
> Files\Autodesk\MapGuideEnterprise2008\WebServerExtensions\www\webconfig.ini");
> 
>         MgUserInformation userInfo = new MgUserInformation("Anonymous",
> "");
>         MgSite site = new MgSite();
>         site.Open(userInfo);
> 
>         String sessionId = site.CreateSession();
>         String webLayout = "Library://DevTV/HelloWorld.WebLayout";
> 
>     }
> }
> 
> default.aspx
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head>
>     <title>HelloWorld</title>
> </head>
> 
> <frameset rows="0,*" border="0" framespacing="0">
>   <frame />
>   <frame id="ViewerFrame"
> src="/mapguide2008/mapviewernet/ajaxviewer.aspx?SESSION=sessionId&WEBLAYOUT=webLayout"/>
> </frameset>
> 
> </html>  
> 
> ****
> 
> How to sent value from code behind to aspx?
> please help..
> 
> regards,
> Staniz
> 

-- 
View this message in context: http://n2.nabble.com/aspx-code-behind-tp2319949p2331264.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list