Which code segment should you add at line 05?

You create a Web Part.
You need to display the number of visits to a SharePoint site collection in a label named LblVisits.
You write the following code segment. (Line numbers are included for reference only.)

Which code segment should you add at line 05?
A. SPSite site = new SPSite(SPContext.Current.Site.ID);
B. SPSite site = SPContext.Current.Site;
C. SPSite site = SPContext.GetContext(HttpContext.Current).Site;
D. SPSite site = SPControl.GetContextSite(HttpContext.Current);

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.