Share via


RadioButtonList.LoadPostData(String, NameValueCollection) 方法

定義

處理 RadioButtonList 控制項的張貼資料。

protected:
 virtual bool LoadPostData(System::String ^ postDataKey, System::Collections::Specialized::NameValueCollection ^ postCollection);
protected virtual bool LoadPostData (string postDataKey, System.Collections.Specialized.NameValueCollection postCollection);
abstract member LoadPostData : string * System.Collections.Specialized.NameValueCollection -> bool
override this.LoadPostData : string * System.Collections.Specialized.NameValueCollection -> bool
Protected Overridable Function LoadPostData (postDataKey As String, postCollection As NameValueCollection) As Boolean

參數

postDataKey
String

控制項的索引鍵識別項,用來為 postCollection 製作索引。

postCollection
NameValueCollection

NameValueCollection,包含使用控制識別項進行索引的值資訊。

傳回

如果 RadioButtonList 的狀態與最後張貼的狀態不同,則為 true,否則為 false

備註

方法 LoadPostData 主要是由衍生自 類別的 RadioButtonList 自訂控制項中的控制項開發人員使用。

方法 LoadPostData 會指出控制項的狀態 RadioButtonList 是否已變更。 換句話說,它會判斷控制項中選取的清單專案是否與最後張貼的值相同。 變更控制項中選取專案的使用者會變更 SelectedIndex 控制項的值 RadioButtonList 。 如果在控制項中選取相同的清單專案,或 RadioButtonList 如果控制項已停用, LoadPostData 則會傳 false 回 。

LoadPostData當 方法傳 true 回控制項時,ASP.NET 網頁架構會 RaisePostDataChangedEvent 叫用 控制項的 方法。

適用於

另請參閱