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

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

IStateManager.SaveViewState メソッド

クラスによって実装された場合は、サーバー コントロールビューステート変化Object保存します

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

Function SaveViewState As Object
Dim instance As IStateManager
Dim returnValue As Object

returnValue = instance.SaveViewState
Object SaveViewState ()
Object^ SaveViewState ()
Object SaveViewState ()
function SaveViewState () : Object

戻り値
ビューステート変化格納している Object オブジェクト

使用例使用例
' Implement the SaveViewState method. If the StateBag
' that stores the MyItem class's view state contains
' a value for the message property and if the value
' has changed since the TrackViewState method was last 
' called, all view state for this class is deleted, 
' using the StateBag.Clear method,and the new value is added.
Function SaveViewState() As Object
 Implements IStateManager.SaveViewState
    ' Check whether the message property exists in 
    ' the ViewState property, and if it does, check
    ' whether it has changed since the most recent
    ' TrackViewState method call.
    If Not CType(_viewstate, IDictionary).Contains("message")
 OrElse _viewstate.IsItemDirty("message")
 Then
        _viewstate.Clear()
        ' Add the _message property to the StateBag.
        _viewstate.Add("message", _message)
    End If
    Return CType(_viewstate, IStateManager).SaveViewState()
End Function 'IStateManager.SaveViewState


// Implement the SaveViewState method. If the StateBag
// that stores the MyItem class's view state contains
// a value for the message property and if the value
// has changed since the TrackViewState method was last 
// called, all view state for this class is deleted, 
// using the StateBag.Clear method,and the new value is added.
object IStateManager.SaveViewState()
{
    // Check whether the message property exists in 
    // the ViewState property, and if it does, check
    // whether it has changed since the most recent
    // TrackViewState method call.
    if (!((IDictionary)_viewstate).Contains("message")
 || _viewstate.IsItemDirty("message"))
    {
        _viewstate.Clear();
        // Add the _message property to the StateBag.
        _viewstate.Add("message", _message);
    }
    return ((IStateManager)_viewstate).SaveViewState();
}

// Implement the SaveViewState method. If the StateBag
// that stores the MyItem class's view state contains
// a value for the message property and if the value
// has changed since the TrackViewState method was last 
// called, all view state for this class is deleted, 
// using the StateBag.Clear method,and the new value is added.
public Object SaveViewState()
{
    // Check whether the message property exists in 
    // the ViewState property, and if it does, check
    // whether it has changed since the most recent
    // TrackViewState method call.
    if (!(((IDictionary)_viewState).Contains("message"))
 
        || _viewState.IsItemDirty("message")) {
        {
            _viewState.Clear();
            // Add the _message property to the StateBag.
            _viewState.Add("message", _message);
        }
    }
    return ((IStateManager)_viewState).SaveViewState();
} //SaveViewState
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「IStateManager.SaveViewState メソッド」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS