Menu.SaveControlState 方法

定義

儲存 Menu 控制項中需要保存的屬性狀態。Saves the state of the properties in the Menu control that need to be persisted.

protected public:
 override System::Object ^ SaveControlState();
protected internal override object SaveControlState ();
override this.SaveControlState : unit -> obj
Protected Friend Overrides Function SaveControlState () As Object

傳回

Object

物件,包含控制項的狀態資料。An object that contains the state data for the control. 如果此狀態沒有任何變更,這個方法就會傳回 nullIf there have been no changes to the state, this method returns null.

備註

這個方法是用來儲存需要保存之控制項中屬性的狀態 Menu ,即使 EnableViewState 屬性設定為也一樣 falseThis method is used to save the state of the properties in the Menu control that need to be persisted, even when the EnableViewState property is set to false. SaveControlState方法會考慮控制項的作業所需的狀態資料 (例如索引或關鍵字) ,並與控制項的檢視狀態資料分開。The SaveControlState method is concerned with state data that is essential for a control's operation (such as an index or keyword) and is separate from the control's view-state data.

注意

這個方法主要由控制項開發人員用來擴充 Menu 控制項。This method is used primarily by control developers to extend the Menu control.

適用於