You need to ensure that clickButton appears
You create a Web Part that contains the following code segment. (Line numbers are included for
reference only.) 01 Public Class WebPart1 02 Inherits WebPart 03 04 Public Sub New() 05
MyBase.New 06 07 End Sub 08 09 Protected Overrides Sub CreateChildControls() 10 Dim
clickButton As Button = New Button 11 12 MyBase.CreateChildControls 13 End Sub 14 15
Protected Overrides Sub RenderContents (ByVal writer As HtmlTextWriter) 16 17
MyBase.RenderContents(writer) 18 End Sub 19 End Class You discover that the clickButton
button does not appear. You need to ensure that clickButton appears. What should you do?
Which base class constructor should you use at line 02?
You have a timer job that has the following constructors. (Line numbers are included for reference
only.) 01 public TimerJob1 () : base() { } 02 public TimerJob1(SPWebApplication wApp) You need
to ensure that the timer job runs on the first available timer server only. Which base class
constructor should you use at line 02?
Which code segment should you add at line 05?
You need to programmatically add a user named User1 to a group named Group1. You write the
following code segment. (Line numbers are included for reference only.) 01 Dim login As String =
“User1” 02 Dim grpName As String = “Group1” 03 Dim user As SPUser =
SPContext.Current.Web.EnsureUser(login) 04 Dim group As SPGroup =
SPContext.Current.Web.Groups(grpName) 05 06 group.Update() Which code segment should
you add at line 05?
You need to ensure that WebPart1 can run as a sandboxed solution in Microsoft SharePoint Server 2010
You are running a default installation of Microsoft Visual Studio 2010. You have a Web Part
named WebPart1. WebPart1 runs on a Microsoft Office SharePoint Server 2007 server. You need
to ensure that WebPart1 can run as a sandboxed solution in Microsoft SharePoint Server 2010.
What should you do?
What should you add to the master page?
You develop a custom master page. You need to ensure that all pages that use the master page
contain a specific image. Page developers must be able to change the image on individual pages.
The master page must be compatible with the default content page. What should you add to the
master page?
You need to ensure that the application activates the Developer Dashboard
You plan to activate the Developer Dashboard. You create a command line application that
contains the following code segment. (Line numbers are included for reference only.) 01Dim cs As
SPWebService = SPWebService.ContentService 02cs.DeveloperDashboardSettings.DisplayLevel
= SPDeveloperDashboardLevel.[On] 03 You execute the application and discover that the
Developer Dashboard fails to appear. You need to ensure that the application activates the
Developer Dashboard. What should you do?
You need to ensure that the Products Web Part sends Productid to the ProductDetails Web Part
You plan to create two Web Parts named Products and ProductDetails. You create an interface
that contains the following code segment. Public Interface Interface1 Property Productid As String
End Interface You need to ensure that the Products Web Part sends Productid to the
ProductDetails Web Part. You must achieve this goal by using the ASP.NET Web Part connection
framework. What should you do?
You need to resolve the error
You create a Web Part that contains the following logging code. (Line numbers are included for
reference only.) 01Try 02 … 03Catch ex As Exception 04
05System.Diagnostics.EventLog.WriteEntry(“WebPart Name”, (“Exception Information: ” +
ex.Message), EventLogEntryType.Error) 06End Try You discover that line 05 causes an error.
You need to resolve the error. What should you do?
You need to change the default search box to MySearch.ascx
You have a SharePoint site that uses a master page named Master1.master. You create a custom
user control named MySearch.ascx. You need to change the default search box to
MySearch.ascx. What should you do?
Which method should you use?
You need to connect two Web Parts by using the IWebPartRow interface. Which method should
you use?