Share via


GetData Method

The GetData method of the WebPart class is the virtual method that is called by the Web Part infrastructure when the System.Web.UI.Control.PreRender event occurs to allow a Web Part to retrieve data.

Remarks

The GetData method is used in conjunction with the GetRequiresData method. A connectable Web Part that requires data should override the GetData method. If the Web Part needs to retrieve data during the PreRender event, it should start an asynchronous worker thread to retrieve the data. If the Web Part needs to wait for data from a connected Web Part, such as a Web Part that implements the IFilter interface, it should do nothing.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security