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.

MSA
  • 1,155
  • 3
  • 20
  • 48

1 Answers1

2

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

if (SPContext.Current.Web.CurrentUser.IsSiteAdmin)
{
    // hide the asp button
}
Eric
  • 176
  • 5