ProfileGroupBase.SetPropertyValue メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ProfileGroupBase.SetPropertyValue メソッドの意味・解説 

ProfileGroupBase.SetPropertyValue メソッド

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

グループ化されたプロファイル プロパティの値を設定します

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

Public Sub SetPropertyValue ( _
    propertyName As String, _
    propertyValue As Object _
)
Dim instance As ProfileGroupBase
Dim propertyName As String
Dim propertyValue As Object

instance.SetPropertyValue(propertyName, propertyValue)
public void SetPropertyValue (
    string propertyName,
    Object propertyValue
)
public:
void SetPropertyValue (
    String^ propertyName, 
    Object^ propertyValue
)
public void SetPropertyValue (
    String propertyName, 
    Object propertyValue
)
public function SetPropertyValue (
    propertyName : String, 
    propertyValue : Object
)

パラメータ

propertyName

設定対象グループ化されたプロパティの名前。

propertyValue

グループ化されたプロパティ代入する値。

解説解説
使用例使用例

次の ASP.NET ページでは、ユーザー プロファイルに対して指定された、グループ化されたプロパティ読み込んだり、設定したりしますユーザー プロファイルグループ化されたプロパティ指定する Web.config ファイルの例については、ProfileGroupBase クラスの例を参照してください

<%@ Page Language="VB" %>
<script runat="server">

Public Sub Page_Load()
  If Not IsPostBack Then
    StreetTextBox.Text          = Profile.Address.Street
    CityTextBox.Text            = Profile.Address.City
    StateTextBox.Text           = Profile.Address.State
    CountryOrRegionTextBox.Text = Profile.Address.CountryOrRegion
    ZipCodeTextBox.Text         = Profile.ZipCode
  End If
End Sub

Public Sub UpdateButton_OnClick(sender As
 Object, args As EventArgs)
  Profile.Address.Street          = StreetTextBox.Text
  Profile.Address.City            = CityTextBox.Text
  Profile.Address.State           = StateTextBox.Text
  Profile.Address.CountryOrRegion = CountryOrRegionTextBox.Text
  Profile.ZipCode                 = ZipCodeTextBox.Text
End Sub

</script>
<html>
<head>
<title>Home Page</title>
</head>
<body>
<h3>Address Information for <%=User.Identity.Name%></h3>
<form runat="server">
  <table border=1 cellpadding=2 cellspacing=2>
    <tr>
      <td>Street Address</td>
      <td><asp:Textbox id="StreetTextBox"
 runat="server" columns="30"
 /></td>
    </tr>
    <tr>
      <td>City</td>
      <td><asp:Textbox id="CityTextBox" runat="server"
 columns="20" /></td>
    </tr>
    <tr>
      <td>State</td>
      <td><asp:Textbox id="StateTextBox"
 runat="server" columns="20"
 /></td>
    </tr>
    <tr>
      <td>Zip Code</td>
      <td><asp:Textbox id="ZipCodeTextBox"
 runat="server" columns="10"
 /></td>
    </tr>
    <tr>
      <td>Country</td>
      <td><asp:Textbox id="CountryOrRegionTextBox"
 runat="server" columns="20"
 /></td>
    </tr>
  </table>
  <asp:Button id="UpdateButton" runat="server"
 OnClick="UpdateButton_OnClick" Text="Update
 Address" />
</form>

</body>
</html>
<%@ Page Language="C#" %>
<script runat="server">

public void Page_Load()
{
  if (!IsPostBack)
  {
    StreetTextBox.Text          = Profile.Address.Street;
    CityTextBox.Text            = Profile.Address.City;
    StateTextBox.Text           = Profile.Address.State;
    CountryOrRegionTextBox.Text = Profile.Address.CountryOrRegion;
    ZipCodeTextBox.Text         = Profile.ZipCode;
  }
}

public void UpdateButton_OnClick(object sender,
 EventArgs args)
{
  Profile.Address.Street          = StreetTextBox.Text;
  Profile.Address.City            = CityTextBox.Text;
  Profile.Address.State           = StateTextBox.Text;
  Profile.Address.CountryOrRegion = CountryOrRegionTextBox.Text;
  Profile.ZipCode                 = ZipCodeTextBox.Text;
}

</script>
<html>
<head>
<title>Home Page</title>
</head>
<body>
<h3>Address Information for <%=User.Identity.Name%></h3>
<form runat="server">
  <table border=1 cellpadding=2 cellspacing=2>
    <tr>
      <td>Street Address</td>
      <td><asp:Textbox id="StreetTextBox" runat="server"
 columns="30" /></td>
    </tr>
    <tr>
      <td>City</td>
      <td><asp:Textbox id="CityTextBox" runat="server"
 columns="20" /></td>
    </tr>
    <tr>
      <td>State</td>
      <td><asp:Textbox id="StateTextBox" runat="server"
 columns="20" /></td>
    </tr>
    <tr>
      <td>Zip Code</td>
      <td><asp:Textbox id="ZipCodeTextBox" runat="server"
 columns="10" /></td>
    </tr>
    <tr>
      <td>Country</td>
      <td><asp:Textbox id="CountryOrRegionTextBox" runat="server"
 columns="20" /></td>
    </tr>
  </table>
  <asp:Button id="UpdateButton" runat="server" OnClick="UpdateButton_OnClick"
 Text="Update Address" />
</form>

</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からProfileGroupBase.SetPropertyValue メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からProfileGroupBase.SetPropertyValue メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からProfileGroupBase.SetPropertyValue メソッド を検索

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

辞書ショートカット

すべての辞書の索引

ProfileGroupBase.SetPropertyValue メソッドのお隣キーワード
検索ランキング

   

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



ProfileGroupBase.SetPropertyValue メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS