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

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

반품

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

예제

다음 코드 예제에서는 메서드의 버전을 구현 하는 서버 컨트롤을 보여 줍니다 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 메서드를 호출합니다.

적용 대상

추가 정보