RadioButtonList.LoadPostData(String, NameValueCollection) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
处理 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调用控件的方法。