Clear Lines
<%
try
{
// --------------------------------------------------//
// Basic initialization
MapGuideApi.MgInitializeWebTier(Constants.WebConfigPath);
// Get the information passed from the viewer
sessionId = Request.Params["SESSION"];
mapName = Request.Params["MAPNAME"];
// Get the user information using the session id
// and set up a connection to the site server
MgUserInformation userInfo = new MgUserInformation(sessionId);
MgSiteConnection siteConnection = new MgSiteConnection();
siteConnection.Open(userInfo);
// Get an instance of the required service(s)
MgResourceService resourceService = (MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);
// --------------------------------------------------//
String featureSourceName = "Session:" + sessionId + "//TemporaryLines.FeatureSource";
MgResourceIdentifier resourceID = new MgResourceIdentifier(featureSourceName);
resourceService.DeleteResource(resourceID);
}
catch (MgException e)
{
Response.Write(" \n");
}
%>