UrlMappingCollection クラスとは? わかりやすく解説

UrlMappingCollection クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

UrlMapping オブジェクトコレクション表します。このクラス継承できません。

名前空間: System.Web.Configuration
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public NotInheritable Class
 UrlMappingCollection
    Inherits ConfigurationElementCollection
Dim instance As UrlMappingCollection
public sealed class UrlMappingCollection :
 ConfigurationElementCollection
public ref class UrlMappingCollection sealed
 : public ConfigurationElementCollection
public final class UrlMappingCollection extends
 ConfigurationElementCollection
public final class UrlMappingCollection extends
 ConfigurationElementCollection
解説解説

UrlMappingCollection 型を使用して、UrlMappingsSection セクション要素コレクションの UrlMappings 要素アクセスできます

使用例使用例

既存Web アプリケーション構成ファイルから UrlMappingCollection オブジェクト取得する方法次のコード例示します構成ファイルからの抜粋示します

<urlMappings enabled="true">
  <add url= "~/home.aspx"
    mappedUrl="~/default.aspx?parm1=1"/>
  <add url= "~/products.aspx"
    mappedUrl="~/default.aspx?parm1=2"/>
</urlMappings>
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")

' Get the <urlMapping> section.
Dim urlMappingSection _
As UrlMappingsSection = _
CType(configuration.GetSection( _
"system.web/urlMappings"), UrlMappingsSection)

' Get the url mapping collection.
Dim urlMappings _
As UrlMappingCollection = _
urlMappingSection.UrlMappings

// Get the Web application configuration.
System.Configuration.Configuration configuration =
    WebConfigurationManager.OpenWebConfiguration(
    "/aspnetTest");

// Get the <urlMapping> section.
UrlMappingsSection urlMappingSection =
  (UrlMappingsSection)configuration.GetSection(
  "system.web/urlMappings");


// Get the url mapping collection.
UrlMappingCollection urlMappings =
  urlMappingSection.UrlMappings;


継承階層継承階層
System.Object
   System.Configuration.ConfigurationElement
     System.Configuration.ConfigurationElementCollection
      System.Web.Configuration.UrlMappingCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
UrlMappingCollection メンバ
System.Web.Configuration 名前空間
UrlMapping クラス
UrlMappingsSection
その他の技術情報
urlMappings 要素 (ASP.NET 設定スキーマ)



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「UrlMappingCollection クラス」の関連用語

UrlMappingCollection クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



UrlMappingCollection クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS