1

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.

2

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, privacy policy and cookie policy

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