<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Testo fumetto Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.TestofumettoCarattere
        {mso-style-name:"Testo fumetto Carattere";
        mso-style-priority:99;
        mso-style-link:"Testo fumetto";
        font-family:"Tahoma","sans-serif";}
span.StileMessaggioDiPostaElettronica19
        {mso-style-type:personal;
        color:black;}
span.longtext1
        {mso-style-name:long_text1;}
span.StileMessaggioDiPostaElettronica21
        {mso-style-type:personal-reply;
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=IT link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal><span class=longtext1><span lang=EN-US style='font-size:
10.0pt;font-family:"Arial","sans-serif";background:white'>Hello, I am new to
MapGuide. I've just started using open source MapGuide 2.1, but I did not even
run the examples (C #) of the guide. </span></span><span class=longtext1><span
lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>possible?</span></span><span
lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>
<span class=longtext1><span style='background:white'>I have too many problems
(I do not work nothing) also asking for help.</span></span><span
style='background:white'><br>
<span class=longtext1>For example map.open generates exception: Resource was
not found</span><br>
<span class=longtext1>Then I used the map.create without exception (with map
Sheboygan) and try to do the exercise to change the visibility of layers. </span></span><span
class=longtext1>The code goes, but video layers do not change.</span><br>
<span class=longtext1>Where can I find (or can you given me) a simple example (
or project &nbsp;for Visual Studio 2008 c#) that works?</span><br>
<br>
<span class=longtext1>Thanks so much! (forgive my English!)<o:p></o:p></span></span></p>

<p class=MsoNormal><span class=longtext1><span lang=EN-US style='font-size:
10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></span></p>

<p class=MsoNormal><span class=longtext1><span lang=EN-US style='font-size:
10.0pt;font-family:"Arial","sans-serif"'>Le.</span></span><span lang=EN-US
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>
<br>
<span class=longtext1>this is my code:<o:p></o:p></span></span></p>

<p class=MsoNormal><span class=longtext1><span lang=EN-US style='font-size:
10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></span></p>

<p class=MsoNormal><span class=longtext1><span lang=EN-US style='font-size:
10.0pt;font-family:"Arial","sans-serif"'>Page 1:<o:p></o:p></span></span></p>

<p class=MsoNormal><span class=longtext1><span lang=EN-US style='font-size:
10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Page</span> <span style='color:red'>language</span><span
style='color:blue'>=&quot;c#&quot;</span> <span style='background:yellow;
mso-highlight:yellow'>%&gt;</span></span><span style='font-family:"Courier New";
background:yellow;mso-highlight:yellow'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Import</span> <span style='color:red'>Namespace</span><span
style='color:blue'>=&quot;System.IO&quot;</span> <span style='background:yellow;
mso-highlight:yellow'>%&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Import</span> <span style='color:red'>Namespace</span><span
style='color:blue'>=&quot;System.Collections.Specialized&quot;</span> <span
style='background:yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Import</span> <span style='color:red'>Namespace</span><span
style='color:blue'>=&quot;System.Text&quot;</span> <span style='background:
yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Import</span> <span style='color:red'>Namespace</span><span
style='color:blue'>=&quot;System.Globalization&quot;</span> <span
style='background:yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Import</span> <span style='color:red'>Namespace</span><span
style='color:blue'>=&quot;OSGeo.MapGuide&quot;</span> <span style='background:
yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> sessionId = <span style='color:#A31515'>&quot;&quot;</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> webLayout = <span style='color:#A31515'>&quot;Library%3a%2f%2fSamples%2fSheboygan%2fLayouts%2fSheboyganAsp.WebLayout&quot;</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:blue'>try<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// Initialize a session and register a variable to
hold the<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// session id, then initialize the Web Extensions,
connect<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// to the site, and create a session.<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// Initialize Web Server Extensions.<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> realPath = Request.ServerVariables[<span
style='color:#A31515'>&quot;APPL_PHYSICAL_PATH&quot;</span>];<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> configPath = realPath + <span
style='color:#A31515'>&quot;..\\webconfig.ini&quot;</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MapGuideApi</span>.MgInitializeWebTier(configPath);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// Connect to the site.<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgUserInformation</span> userInfo = <span
style='color:blue'>new</span> <span style='color:#2B91AF'>MgUserInformation</span>(<span
style='color:#A31515'>&quot;Administrator&quot;</span>, <span style='color:
#A31515'>&quot;admin&quot;</span>);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgSite</span> site = <span style='color:blue'>new</span>
<span style='color:#2B91AF'>MgSite</span>();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
site.Open(userInfo);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// Create a session<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sessionId = site.CreateSession();&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:blue'>catch</span> (<span style='color:#2B91AF'>Exception</span>
e)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Response.Write(e.Message);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
Response.Redirect(<span style='color:#A31515'>&quot;InformationMap.aspx?SESSION=&quot;</span>
+ sessionId);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>%&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;!</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>DOCTYPE</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>html</span> <span style='color:red'>PUBLIC</span> <span
style='color:blue'>&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span> <span
style='color:blue'>&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>html</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>xmlns</span><span style='color:blue'>=&quot;http://www.w3.org/1999/xhtml&quot;</span>
<span style='color:blue'>&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>head</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:blue'>&lt;</span><span style='color:#A31515'>title</span><span
style='color:blue'>&gt;</span>HelloWorld<span style='color:blue'>&lt;/</span><span
style='color:#A31515'>title</span><span style='color:blue'>&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;/</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>head</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>frameset</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>rows</span><span style='color:blue'>=&quot;0,*&quot;</span> <span
style='color:red'>border</span><span style='color:blue'>=&quot;0&quot;</span> <span
style='color:red'>framespacing</span><span style='color:blue'>=&quot;0&quot;&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp; <span
style='color:blue'>&lt;</span><span style='color:#A31515'>frame</span> <span
style='color:blue'>/&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp; <span
style='color:blue'>&lt;</span><span style='color:#A31515'>frame</span> <span
style='color:red'>src</span><span style='color:blue'>=&quot;/mapguide/mapviewernet/ajaxviewer.aspx?SESSION=</span><span
style='background:yellow;mso-highlight:yellow'>&lt;%</span>= sessionId <span
style='background:yellow;mso-highlight:yellow'>%&gt;</span><span
style='color:blue'>&amp;WEBLAYOUT=</span><span style='background:yellow;
mso-highlight:yellow'>&lt;%</span>= webLayout <span style='background:yellow;
mso-highlight:yellow'>%&gt;</span><span style='color:blue'>&quot;</span> <span
style='color:red'>name</span><span style='color:blue'>=&quot;ViewerFrame&quot;</span>
<span style='color:blue'>/&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&lt;/</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>frameset</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>&lt;/</span><span style='font-size:10.0pt;font-family:"Courier New";
color:#A31515'>html</span><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>&gt;</span><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>Page
2:<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Page</span> <span style='color:red'>Language</span><span
style='color:blue'>=&quot;c#&quot;</span> <span style='background:yellow;
mso-highlight:yellow'>%&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:blue'>@</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>
<span style='color:#A31515'>Import</span> <span style='color:red'>Namespace</span><span
style='color:blue'>=&quot;OSGeo.MapGuide&quot;</span> <span style='background:
yellow;mso-highlight:yellow'>%&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>&lt;%<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:#2B91AF'>String</span> MgSessionId = <span style='color:#A31515'>&quot;&quot;</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:#2B91AF'>String</span> webLayout = <span style='color:#A31515'>&quot;Library%3a%2f%2fSamples%2fSheboygan%2fLayouts%2fSheboyganAsp.WebLayout&quot;</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:blue'>try<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;
MgSessionId = Request.QueryString[<span style='color:#A31515'>&quot;SESSION&quot;</span>];&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// Initialize Web Server Extensions.<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> realPath = Request.ServerVariables[<span
style='color:#A31515'>&quot;APPL_PHYSICAL_PATH&quot;</span>];<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> configPath = realPath + <span
style='color:#A31515'>&quot;..\\webconfig.ini&quot;</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MapGuideApi</span>.MgInitializeWebTier(configPath);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgUserInformation</span> userInfo = <span
style='color:blue'>new</span> <span style='color:#2B91AF'>MgUserInformation</span>(MgSessionId);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgSiteConnection</span> siteConnection = <span
style='color:blue'>new</span> <span style='color:#2B91AF'>MgSiteConnection</span>();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
siteConnection.Open(userInfo);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgResourceService</span> resourceService =
siteConnection.CreateService(<span style='color:#2B91AF'>MgServiceType</span>.ResourceService)
<span style='color:blue'>as</span> <span style='color:#2B91AF'>MgResourceService</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgResourceIdentifier</span> mapDefid = <span
style='color:blue'>new</span> <span style='color:#2B91AF'>MgResourceIdentifier</span>(<span
style='color:#A31515'>&quot;Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&quot;</span>);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgMap</span> map = <span style='color:blue'>new</span>
<span style='color:#2B91AF'>MgMap</span>();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
map.Create(resourceService, mapDefid, <span style='color:#A31515'>&quot;Sheboygan&quot;</span>);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// Exception!!! -.-'&nbsp;&nbsp;&nbsp; <o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// map.Open(resourceService, &quot;Sheboygan&quot;);<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// map.Open(&quot;Sheboygan&quot;);<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>//&nbsp; map.Open(resourceService, mapDefid);<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgEnvelope</span> envelope = map.GetMapExtent();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>Double</span> lowerX =
envelope.GetLowerLeftCoordinate().GetX();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>Double</span> lowerY =
envelope.GetLowerLeftCoordinate().GetY();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> mapname = map.GetName();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgLayerCollection</span> layerCol =
map.GetLayers();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgLayer</span> layer = <span style='color:blue'>null</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>String</span> layerName = <span style='color:#A31515'>&quot;&quot;</span>;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:blue'>for</span> (<span style='color:blue'>int</span> i = 0;
i &lt; layerCol.GetCount(); i++)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layer = (<span style='color:#2B91AF'>MgLayer</span>)layerCol.GetItem(i);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layerName = layer.GetName();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layer = (<span style='color:#2B91AF'>MgLayer</span>)layerCol.GetItem(<span
style='color:#A31515'>&quot;Districts&quot;</span>);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:#2B91AF'>MgLayerGroup</span> gruppo = layer.GetGroup();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
gruppo.SetLegendLabel(<span style='color:#A31515'>&quot;cambiata&quot;</span>);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>//
gruppo.SetDisplayInLegend(false);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>//if
(layer.IsVisible())<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// {<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layer.SetVisible(<span style='color:blue'>false</span>);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>// }<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>//&nbsp; else<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>//&nbsp; {<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:green'>//&nbsp;&nbsp;&nbsp;&nbsp; layer.SetVisible(true);<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:green'>//&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'>//try<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layer.ForceRefresh();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'>//try<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
layer.NeedsRefresh();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:blue'>catch</span> (<span style='color:#2B91AF'>Exception</span>
e)<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Response.Write(e.Message);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'>%&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";background:yellow;mso-highlight:
yellow'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;!</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>DOCTYPE</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>html</span> <span style='color:red'>PUBLIC</span> <span
style='color:blue'>&quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot;</span> <span
style='color:blue'>&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&quot;&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>html</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>xmlns</span><span style='color:blue'>=&quot;http://www.w3.org/1999/xhtml&quot;</span>
<span style='color:blue'>&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>head</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span
style='color:blue'>&lt;</span><span style='color:#A31515'>title</span><span
style='color:blue'>&gt;</span>MapGuide Developer's Guide ASP.NET Samples<span
style='color:blue'>&lt;/</span><span style='color:#A31515'>title</span><span
style='color:blue'>&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;/</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>head</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>frameset</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>rows</span><span style='color:blue'>=&quot;80,*&quot;</span> <span
style='color:red'>frameborder</span><span style='color:blue'>=&quot;no&quot;</span>
<span style='color:red'>framespacing</span><span style='color:blue'>=&quot;0&quot;&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='color:blue'>&lt;</span><span style='color:#A31515'>frame</span> <span
style='color:red'>id</span><span style='color:blue'>=&quot;titleFrame&quot;</span>
<span style='color:red'>frameborder</span><span style='color:blue'>=&quot;no&quot;</span>
<span style='color:red'>marginwidth</span><span style='color:blue'>=&quot;0&quot;</span>
<span style='color:red'>marginheight</span><span style='color:blue'>=&quot;0&quot;</span>
<span style='color:red'>scrolling</span><span style='color:blue'>=&quot;no&quot;</span>
<span style='color:red'>src</span><span style='color:blue'>=&quot;common/title.html&quot;&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>frame</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>id</span><span style='color:blue'>=&quot;viewerFrame&quot;</span>
<span style='color:red'>frameborder</span><span style='color:blue'>=&quot;no&quot;</span>
<span style='color:red'>marginwidth</span><span style='color:blue'>=&quot;10&quot;</span>
<span style='color:red'>marginheight</span><span style='color:blue'>=&quot;10&quot;</span>
<span style='color:red'>scrolling</span><span style='color:blue'>=&quot;yes&quot;</span>
<span style='color:red'>src</span><span style='color:blue'>=&quot;../mapviewernet/ajaxviewer.aspx?SESSION=</span><span
style='background:yellow;mso-highlight:yellow'>&lt;%</span>=MgSessionId<span
style='background:yellow;mso-highlight:yellow'>%&gt;</span><span
style='color:blue'>&amp;WEBLAYOUT=</span><span style='background:yellow;
mso-highlight:yellow'>&lt;%</span>=webLayout<span style='background:yellow;
mso-highlight:yellow'>%&gt;</span><span style='color:blue'>&quot;&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;/</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>frame</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;/</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>frame</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;/</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>frameset</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>body</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:blue'>&lt;</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'>input</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span
style='color:red'>type</span><span style='color:blue'>=&quot;button&quot;</span>
<span style='color:red'>value</span><span style='color:blue'>=&quot;Point&quot;</span>
<span style='color:red'>onclick</span><span style='color:blue'>=&quot;DigitizePoint();&quot;</span>
<span style='color:blue'>/&gt;<o:p></o:p></span></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&lt;/</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>body</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&lt;/</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#A31515'>html</span><span style='font-size:
10.0pt;font-family:"Courier New";color:blue'>&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='color:black'><o:p>&nbsp;</o:p></span></p>

</div>

</div>

</body>

</html>