2010/01/02

To hide unApproved content in query

To hid unapproved content in SPQuery object set the following property in code behind
as the following.

query.ViewAttributes = "Scope='Recursive' ModerationType='HideUnapproved'";