IPostBackDataHandler.LoadPostData(String, NameValueCollection) 메서드

정의

클래스에서 구현될 경우 ASP.NET 서버 컨트롤의 포스트백된 데이터를 처리합니다.

public:
 bool LoadPostData(System::String ^ postDataKey, System::Collections::Specialized::NameValueCollection ^ postCollection);
public bool LoadPostData (string postDataKey, System.Collections.Specialized.NameValueCollection postCollection);
abstract member LoadPostData : string * System.Collections.Specialized.NameValueCollection -> bool
Public Function LoadPostData (postDataKey As String, postCollection As NameValueCollection) As Boolean

매개 변수

postDataKey
String

컨트롤의 키 식별자입니다.

postCollection
NameValueCollection

들어오는 모든 이름 값의 컬렉션입니다.

반환

Boolean

서버 컨트롤의 상태가 포스트백의 결과로 변경되면 true이고, 그렇지 않으면 false입니다.

예제

다음 코드 예제에서는의 버전을 구현 하는 서버 컨트롤은 LoadPostData 메서드.

public virtual bool LoadPostData(string postDataKey,
   NameValueCollection postCollection) {

   String presentValue = Text;
   String postedValue = postCollection[postDataKey];

   if (presentValue == null || !presentValue.Equals(postedValue)){
      Text = postedValue;
      return true;
   }
   return false;
}
Public Overridable Function LoadPostData(postDataKey As String, _
   postCollection As NameValueCollection) As Boolean
       
    Dim presentValue As String = Text
    Dim postedValue As String = postCollection(postDataKey)
       
    If (presentValue Is Nothing) OrElse (Not presentValue.Equals(postedValue)) Then 
        Text = postedValue
        Return True
    End If
    Return False
End Function

설명

반환 하는 모든 서버 컨트롤을 추적 하는 ASP.NET 페이지 프레임 워크 true 이 메서드 호출에 대 한 다음 호출는 RaisePostDataChangedEvent 컨트롤만 메서드.

적용 대상

추가 정보