Which attribute should you set in the Web Part?
You create a custom Web Part. You need to ensure that a custom property is visible in Edit mode.
Which attribute should you set in the Web Part?
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 { String ProductId { get; } }
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 provide the site administrator with the ability to change the out-of- the-box search control to My
You create a user control named MySearch.ascx. You plan to change the native search control in
SharePoint to MySearch.ascx. You need to provide the site administrator with the ability to
change the out-of- the-box search control to MySearch.ascx. What should you do?
You need to create a class to log Web Part errors to the Unified Logging Service (ULS) logs
You create a custom Web Part. You need to create a class to log Web Part errors to the Unified
Logging Service (ULS) logs. What should you use?
You need to ensure that the Web Part can access the local file system on a SharePoint server
You have a custom Web Part that is deployed as a sandboxed solution. You need to ensure that
the Web Part can access the local file system on a SharePoint server. You must minimize the
amount of privileges assigned to the Web Part. What should you do?
You need to create a custom user interface for modifying the Web Part properties
You have a custom Web Part. You need to create a custom user interface for modifying the Web
Part properties. 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?
You need to resolve the error
You create a Web Part that contains the following logging code. (Line numbers are included for
reference only.) 01 SPWeb web = SPContext.Current.Web; 02 try 03 { 04 05 } 06 catch
(Exception ex) 07 { 08 09 System.Diagnostics.EventLog.WriteEntry(“WebPart Name”, (“Exception
Information: ” + ex.Message), EventLogEntryType.Error); 10 } You discover that line 09 causes an
error. You need to resolve the error. 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?
You need to ensure that all users can use the Web Part to update the description of the current site
You create a Web Part that programmatically updates the description of the current SharePoint
site. The Web Part contains the following code segment. (Line numbers are included for reference
only.) 01 SPSecurity.RunUithElevatedPrivileges (delegate() 02 { 03 SPSite currSite =
SPConcext.Current.Site ; 04 SPUeb currUeb = SPContext.Current.Ueb ; 05 using (SPSite eSite =
new SPSite ( currSite.ID ) ) 06 { 07 using (SPWeb eWeb = eSite.OpenUeb ( currUeb.ID ) ) 08 { 09
Web.AllowUnsafeUpdates = true; 10 currUeb.Description = “Test”; 11 currUeb.Update (); 12
eUeb.AllowUnsafeUpdates = false; 13 } 14 } 15 } 16 }; Users report that they receive an Access
Denied error message when they use the Web Part. You need to ensure that all users can use the
Web Part to update the description of the current site. What should you do?