I have a asp.net button , And I would like to show only to sharepoint site administrator using Server Object Model.

Can any one help me how can I do this.

1 Answer 1


For SSOM, you can use the SPUser.IsSiteAdmin from SPContext:

if (SPContext.Current.Web.CurrentUser.IsSiteAdmin)
    // hide the asp button

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.