You have a custom theme named MyTheme. The theme is defined in a file named MyTheme.thmx. You have a console application that contains the following code segment.
(Line numbers are included for reference only.)
01 Using site As New SPSite("http://intranet")
02 Dim web As SPWeb = site.OpenWeb()
03 ...
04 End Using
You need to programmatically apply the theme to a SharePoint site.
Which code segment should you add to the console application?
A. ThmxTheme.SetThemeUrlForWeb(web, "/_catalogs/theme/MyTheme.thmx", False)You are creating an application. You develop a custom control that renders a contextual tab.
The control contains the following code segment. (Line numbers are included for reference only.)
01Protected Overloads Overrides Sub OnPreRender(ByVal e As EventArgs)
02 Dim curRibbon As SPRibbon = SPRibbon.GetCurrent(Me.Page) 04 curRibbon.MakeContextualGroupInitiallyVisible
("SP.Ribbon.ContextualGroup", String.Empty)
05 MyBase.OnPreRender(e)
06 End Sub
You need to ensure that when the custom control is rendered, the custom contextual tab appears in the Ribbon. Which code segment should you add at line 03?
A. curRibbon.Enabled = trueYou need to create a Web Part that displays all content created by a specific user. You write the following code segment. (Line numbers are included for reference only.)
01 privace void keywordQueryExecute (string searchAuthor )
02 {
03 KeywordQuery kRequest = new KeywordQuery ( ServerContexc.Current ) ; 05 kPequest.QueryText = strQuery ;
06 ResultTableCollection resultTbls = kRequest.Execute () ;
07 }
Which code segment should you add at line 04?
A. string strQuery - "SELECT Title, Rank, Write, Url FROM SCOPE() WHERE docID - " + searchAuthor ;You create a Web Part that updates a list.
You need to ensure that users can use the Web Part to update the list, regardless of the users' permissions to the list.
What should you use in the Web Part?
A. the SPSecurity.AuthenticationMode propertyYou are developing an application page. You need to create a pop-up window that uses the ECMAScript object model. Which namespace should you use?
A. SP.UI.MenuUsing Microsoft Visual Studio 2010, you create a custom workflow action named WF1 that copies the content of a document library to another document library.
WF1 is used in a Microsoft SharePoint Designer reusable workflow.
You need to ensure that the workflow action can be deployed to multiple sites.
Where should you define the workflow action?
A. the ReplicatorActivity activityYou need to create a Web control that displays HTML content during the last stage of the page processing lifecycle. Which method should you override in the Web control?
A. LoadControlStateYou 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?
A. Create a new Visual Web Part by using the code from WebPart1.You create a console application to manage Personal Sites.
The application contains the following code segment. (Line numbers are included for reference only.)
01 SPSite siceCollection = new SPSite ("http://rcoss");
02 UserProfileManager profileManager = new UserProfileManager
( Server-Context.GetContext (siteCollection)) ;
03 UserProf ile profile = prof ileManager. GetUser Prof ile ("domainWusername") ;
04 SPSite personalSite = profile.PersonalSite ;
06 siteCollection.Dispose ();
You deploy the application to a SharePoint site.
After deploying the application, users report that the site loads slowly.
You need to modify the application to prevent the site from loading slowly.
What should you do?
A. Remove line 06.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.)
01 SPSecurity.RunWithElevatedPrivileges(delegate()
02 {
03 try
04 {
06 LblVisits.Text = site.Usage.Visits.ToString(); 07 }
08 finally
09 {
11 }
12 });
Which code segment should you add at line 05?
A. SPSite site = new SPSite(SPContext.Current.Site.ID);Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-573 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.