[mapguide-users] aspx code behind

Jackie Ng jumpinjackie at gmail.com
Fri Feb 13 07:31:03 EST 2009


Include a runat="server" attribute in the html element you want to expose.

Then in the code-behind, either set its relevant properties or its
Attributes collection property.

- Jackie


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-tp2319949p2320957.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list