共用方式為


ViewStateService.StoreViewState(ModelItem, String, Object) 方法

定義

儲存指定之 modelItem 檢視狀態的層面,以符合指定的 key

public:
 abstract void StoreViewState(System::Activities::Presentation::Model::ModelItem ^ modelItem, System::String ^ key, System::Object ^ value);
public abstract void StoreViewState (System.Activities.Presentation.Model.ModelItem modelItem, string key, object value);
abstract member StoreViewState : System.Activities.Presentation.Model.ModelItem * string * obj -> unit
Public MustOverride Sub StoreViewState (modelItem As ModelItem, key As String, value As Object)

參數

modelItem
ModelItem

套用檢視狀態的 ModelItem

key
String

識別要儲存之檢視狀態層面的 String

value
Object

要儲存的 Object

備註

您可以呼叫 RetrieveViewState 並傳遞 modelItemkey 的相同值,以擷取已儲存的物件。

適用於