Which code segment should you add to the Web Part?

You plan to develop a Web Part that displays a SharePoint list.
The Web Part will verify the list permissions when users access by using the web.CurrentUser.DoesUserHavePermissions method.
You need to ensure that when users do not have permissions to the list, the Web Part displays the company’s logo.
Which code segment should you add to the Web Part?
A. RunWithElevatedPrivileges
B. web.AllowUnsafeUpdates= true;
C. web.CurrentUser.RequireRequestToken = false;
D. web.ValidateFormDigest();

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.