IPostBackDataHandler.LoadPostData Method
.NET Framework 3.0
When implemented by a class, processes postback data for an ASP.NET server control.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
boolean LoadPostData ( String postDataKey, NameValueCollection postCollection )
function LoadPostData ( postDataKey : String, postCollection : NameValueCollection ) : boolean
Not applicable.
Parameters
- postDataKey
The key identifier for the control.
- postCollection
The collection of all incoming name values.
Return Value
true if the server control's state changes as a result of the postback; otherwise, false.The ASP.NET page framework tracks all the server controls that return true to this method call, and then invokes the RaisePostDataChangedEvent method on those controls.
The following code example demonstrates a server control that implements a version of the LoadPostData method.
public boolean LoadPostData(String postDataKey,
NameValueCollection postCollection)
{
String presentValue = text;
String postedValue = postCollection.get_Item(postDataKey);
if (presentValue == null || !(presentValue.Equals(postedValue))) {
text = postedValue;
return true;
}
return false;
} //LoadPostData
Community Additions
ADD
Show: