[ZS2] [mapguide-users] aspx code behind
Kenneth Skovhede, GEOGRAF A/S
ks at geograf.dk
Fri Feb 13 05:39:22 EST 2009
That is not really a MapGuide question, but a .Net programming question,
so you may have better luck at some .Net forum.
There are two ways to do it:
1) use the asp style tags <%=webLayout%> and declare the variable
webLayout as public in the class.
2) use a .Net dom element and assign the properties through that.
Both methods are well documented on the web.
Regards, Kenneth Skovhede, GEOGRAF A/S
staniz skrev:
> 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
>
More information about the mapguide-users
mailing list