[mapguide-users] Taskpane in Mapguide Maestro

padmini godavarthi godavarthi.padmini at gmail.com
Mon Dec 22 23:36:19 EST 2008


Hi

thanks for u r reply.
 Now my problem is that


 <%@ Page language="c#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Collections.Specialized" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="OSGeo.MapGuide" %>

script runat="server">

    String webLayout = "Library://Orasample/layout1.WebLayout";
   
 
String sessionId = "";
    
     
</script>

<%
    try
    {
        // Initialize a session and register a variable to hold the
        // session id, then initialize the Web Extensions, connect
        // to the site, and create a session.

        // Initialize Web Server Extensions.
        String realPath = Request.ServerVariables["APPL_PHYSICAL_PATH"];
        String configPath = realPath + "..\\webconfig.ini";
        MapGuideApi.MgInitializeWebTier(configPath);

        // Connect to the site.
        MgUserInformation userInfo = new MgUserInformation("Anonymous", "");
        MgSite site = new MgSite();
        site.Open(userInfo);

		// Create a session
        sessionId = site.CreateSession();
 
        
        
    }
        
    catch (Exception e)
    {
        Response.Write(e.Message);
    }
       
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Samples</title>
</head>

<frameset rows="110,*" frameborder="no" framespacing="0">
<frame id="titleFrame" frameborder="no" marginwidth="0" marginheight="0"
scrolling="no" src="title.html">
	<frame id="viewerFrame" frameborder="no" marginwidth="0" marginheight="0"
scrolling="no"
src="../mapviewernet/ajaxviewer.aspx?SESSION=<%=sessionId%>&WEBLAYOUT=<%=webLayout%>">
</frameset>

</html>
In that above layout i want to give my customization page.

for that purpose i added Osgeo.Mapguide.MaestroAPI.dll to my application  
1)next what i have to do

Thanks and Regards,
Padmini





Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> The easy way is to assign a common page,  ea. redirect_on_startup.aspx,
> and
> then use that page to forward to the desired page.
> 
> The other way is to save a modified copy of the WebLayout as a temporary 
> item.
> An untested exaple would be:
> ServerConnectionI con; //<-- Assign this
> WebLayout wl = con.GetWebLayout("Library://mylayout.WebLayout");
> wl.TaskPane.InitialTask = "http://www.example.com/my_special_page.html";
> string tempid = ResourceIdentifier("xx", ResourceTypes.WebLayout, 
> con.SessionID);
> con.SaveResourceAs(wl, tempid);
> 
> //Redirect to the temp weblayout:
> Response.Redirect("/mapguide/mapviewerajax/?WEBLAYOUT=" + 
> Server.UrlEncode(tempid) + "&SESSION=" + Server.UrlEncode(con.SessionID));
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> 
> padmini godavarthi skrev:
>>
>>    Hi,
>> Iam using Mapguide Opensource 2.0 (wiht .Net 2.0 +IIS 5.1).
>> Iam Creating my mapdata using Mapguide Maestro. Now i want to add my
>> custom
>> page to the ajax viewer weblayout.
>>
>> I gave My Customize Web Page path in 
>>
>>
>>     initial  task in taskpane 
>>
>> for exqample i gave the path (../sampleapplication/customize.aspx)
>>
>> but i want to gave this path  dynamically (through programmetically) to
>> the
>> Weblayout 
>>
>> 1) Can u plz tell me the way so that it will be very helpful to me.
>>
>> Thanks and Regards
>> Padmini
>>   
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Taskpane-in-Mapguide-Maestro-tp21123885p21139495.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list