ProfileManager.GetNumberOfProfiles メソッド
アセンブリ: System.Web (system.web.dll 内)

Public Shared Function GetNumberOfProfiles ( _ authenticationOption As ProfileAuthenticationOption _ ) As Integer
Dim authenticationOption As ProfileAuthenticationOption Dim returnValue As Integer returnValue = ProfileManager.GetNumberOfProfiles(authenticationOption)
public static function GetNumberOfProfiles ( authenticationOption : ProfileAuthenticationOption ) : int
戻り値
データ ソース内のプロファイルの数。

GetNumberOfProfiles メソッドは、構成ファイル内の applicationName 属性で指定されたアプリケーションの、ユーザー プロファイルの総数をデータ ソースから取得するために使用されます。検索対象のプロファイル (匿名のプロファイルのみ、認証済みプロファイルのみ、またはすべてのプロファイル) を指定するには、authenticationOption パラメータを使用します。

構成済みの applicationName に対するすべてのプロファイルのプロファイル情報を表示し、該当するプロファイルの数を返すコード例を次に示します。
<%@ Page Language="VB" %> <%@ Import Namespace="System.Web.Profile" %> <script runat="server"> Public Sub Page_Load() TotalLabel.Text = ProfileManager.GetNumberOfProfiles(ProfileAuthenticationOption.All).ToString() GetProfiles() End Sub Private Sub GetProfiles() ProfileGrid.DataSource = ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All) ProfileGrid.DataBind() End Sub </script> <html> <head> <title>Sample: Find Profiles</title> </head> <body> <form runat="server"> <h3>Profile List</h3> <asp:Label id="TotalLabel" runat="server" text="0" /> Profiles found.<BR> <asp:GridView id="ProfileGrid" runat="server" CellPadding="2" CellSpacing="1" Gridlines="Both"> <HeaderStyle BackColor="darkblue" ForeColor="white" /> </asp:GridView> </form> </body> </html>
<%@ Page Language="C#" %> <%@ Import Namespace="System.Web.Profile" %> <script runat="server"> public void Page_Load() { TotalLabel.Text = ProfileManager.GetNumberOfProfiles(ProfileAuthenticationOption.All).ToString(); GetProfiles(); } private void GetProfiles() { ProfileGrid.DataSource = ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All); ProfileGrid.DataBind(); } </script> <html> <head> <title>Sample: Find Profiles</title> </head> <body> <form runat="server"> <h3>Profile List</h3> <asp:Label id="TotalLabel" runat="server" text="0" /> Profiles found.<BR> <asp:GridView id="ProfileGrid" runat="server" CellPadding="2" CellSpacing="1" Gridlines="Both"> <HeaderStyle BackColor="darkblue" ForeColor="white" /> </asp:GridView> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からProfileManager.GetNumberOfProfiles メソッドを検索する場合は、下記のリンクをクリックしてください。

- ProfileManager.GetNumberOfProfiles メソッドのページへのリンク