PrepAway - Latest Free Exam Questions & Answers

Which code condition should you use?

You need to create a Web Part that verifies whether a user who accesses the Web Part page is a
member of a group named Group1. Which code condition should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
SPContext.Current.Web.Groups(“Group1”).ContainsCurrentUser

B.
SPContext.Current.Web.SiteUsers
(SPContext.Current.Web.CurrentUser.ID).Groups(“Group1”) == null

C.
SPContext.Current.Web.SiteUsers
(SPContext.Current.Web.CurrentUser.ID).Groups(“Group1”) = null

D.
SPContext.Current.Web.Users(“Group1”).IsDomainGroup


Leave a Reply