ProfileGroupSettingsCollection クラス
アセンブリ: System.Web (system.web.dll 内)
構文
ProfileGroupSettingsCollection クラスは、ProfileGroupSettings オブジェクトのコレクションを格納します。各オブジェクトは ProfilePropertySettings オブジェクトのコレクションを格納します。
ProfilePropertySettings クラスを使用すると、構成ファイルの profile セクションの properties サブセクションに追加された個々のプロパティの定義をプログラムから作成、アクセス、および変更できます。
構成ファイルの profile セクションは、ユーザー プロファイルのスキーマを指定します。実行時に、ASP.NET コンパイル システムは、profile セクションに指定された情報を使用して、ProfileBase から派生した ProfileCommon というクラスを生成します。ProfileCommon クラス定義は、構成ファイルの profile セクションの properties サブセクションで定義されたプロパティに基づきます。
プロファイル プロパティの詳細については、「ASP.NET プロファイル プロパティの概要」を参照してください。ASP.NET 2.0 で追加されたプロファイル機能の詳細については、「ASP.NET プロファイル プロパティ」を参照してください。
以下は、構成ファイルからの抜粋です。ProfileGroupSettingsCollection の複数のプロパティに対して、profile 構成ファイル セクションの properties 要素の group 要素として、宣言によって値を指定する方法を示しています。
<system.web> <profile enabled = "true" defaultProvider="AspNetSqlProfileProvider"> <providers> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider " connectionStringName="LocalSqlServer" applicationName="/" description="Stores and retrieves profile data from the local Microsoft SQL Server database" /> </providers> <properties> <group name = "SiteColors" > <add name = "BackGround"/> <add name = "SideBar"/> <add name = "ForeGroundText"/> <add name = "ForeGroundBorders"/> </group> <group name="Forums"> <add name = "HasAvatar" type="bool" provider="Forums"/> <add name = "LastLogin" type="DateTime" provider="Forums"/> <add name = "TotalPosts" type="int" provider="Forums"/> </group> </properties> </profile> </system.web>
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationElementCollection
System.Web.Configuration.ProfileGroupSettingsCollection
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- ProfileGroupSettingsCollection クラスのページへのリンク