GetRequiresData Method

The GetRequiresData 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 indicate that a Web Part requires data.

Return Value

true if the Web Part requires data; otherwise false.

Remarks

The GetRequiresData method is used in conjunction with the GetData method. A connectable Web Part that requires data should override the GetRequiresData method. This method should return true until the Web Part has finished with all of its data requests. The Web Part should continue to return true even if it is not currently in a position to make a request. For example, if it is waiting on data from an interface from Microsoft.SharePoint.WebPartPages.Communications namespace such as the IFilter interface.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security