本文整理匯總了C#中System.Web.Configuration.UrlMappingCollection.Clear方法的典型用法代碼示例。如果您正苦於以下問題:C# UrlMappingCollection.Clear方法的具體用法?C# UrlMappingCollection.Clear怎麽用?C# UrlMappingCollection.Clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Web.Configuration.UrlMappingCollection
的用法示例。
在下文中一共展示了UrlMappingCollection.Clear方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: if
// Clear the url mapping collection.
urlMappings.Clear();
// Update the configuration file.
// Define the save modality.
ConfigurationSaveMode saveMode =
ConfigurationSaveMode.Minimal;
urlMappings.EmitClear =
Convert.ToBoolean(parm2);
if (parm1 == "none")
{
if (!urlMappingSection.IsReadOnly())
configuration.Save();
msg = String.Format(
"Default modality, EmitClear: {0}",
urlMappings.EmitClear.ToString());
}
else
{
if (parm1 == "full")
saveMode = ConfigurationSaveMode.Full;
else
if (parm1 == "modified")
saveMode = ConfigurationSaveMode.Modified;
if (!urlMappingSection.IsReadOnly())
configuration.Save(saveMode);
msg = String.Format(
"Save modality: {0}",
saveMode.ToString());
}