Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Query property of the SPQuery class gets or sets the inner XML used in the query.
Property Value
A string containing a fragment in Collaborative Application Markup Language (CAML) that defines the query.
Remarks
The Query property contains a string that corresponds to the inner XML of the Query element in CAML.
Example
The following code example uses the Query property to define a query that returns items whose Field2 values are greater than 1000.
This example requires using directives (Imports in Visual Basic) for the Microsoft.SharePoint, Microsoft.SharePoint.Utilities, and Microsoft.SharePoint.WebControls namespaces.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security