You create a Web Part that takes three values from three text boxes and creates a new SharePoint site when you click a button named CreateNewSite. The Web Part contains the following code segment.
Protected Sub CreateNewSite_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim site As SPSite = SPContext.Current.Site
Dim web As SPWeb = site.AllWebs.Add(SiteNameTextBox.Text, SiteTitleTextBox.Text,
SiteDescriptionTextBox.Text, 0, SPWebTemplate.WebTemplateSTS, False, _False)
End Sub
You test the Web Part and it works properly. When another user attempts to use the Web Part to create a new site, he receives the following error message: "Error: Access Denied."
You need to ensure that users can use the Web Part to create new sites. What should you do?
A. Add web.Update() after the code segment.You have a Feature that contains an image named ImageVl.png.
You plan to create a new version of the Feature.
You need to ensure that when the Feature is upgraded, the image is renamed as ImageV2.png.
You must achieve this goal by using the minimum amount of development effort.
Which element should you configure in the Feature definition file?
You have a SharePoint site that uses the default search settings.
You create a new Search Center.
You need to ensure that the new Search Center is the default Search Center for the site. What should you modify?
A. the AllWebs collection of the site collectionYou are creating a custom workflow action that will be used in Microsoft SharePoint Designer reusable workflows. The action will programmatically create a SharePoint site named Site1 at a specific URL.
You need to ensure that users can specify the URL of Site1 in the action.
What should you use?
A. the DependencyProperty classYou 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?
A. the ILoggingProvider interfaceYou are creating an application page that will open a dialog box.
The dialog box uses a custom master page. You write the following code segment. (Line numbers are included for reference only.)
01
You need to ensure that the code opens the dialog box.
What should you do?
A. Add a script link that references SP.js.You develop a custom master page.
You need to ensure that all pages that use the master page contain a specific image in the same location. Page developers must be able to change the image on individual pages without impacting other pages that use the same master page.
What should you add to the master page?
A. a ContentPlaceHolder controlYou need to create a Web Part that hides the out-of-the-box Ribbon on the current page. Which code segment should you include in the Web Part?
A. me.Page.FindControl(*'SPRibbon") .Dispose*)You have a document library named Documents. Minor and major version management is enabled for the document library.
You plan to add a document named MyFile.docx to Documents. You create a console application that contains the following code segment. (Line numbers are included for reference only.)
01 using (SPSite site = new SPSite("http://intranet"))
02 {
03 SPList documents = site.RootWeb.Lists["Documents"];
04 FileStream fstream = File.OpenRead(@"MyFile.docx");
05 byte[] content = new byte[fstream.Length];
06 fstream.Read(content, 0, (int)fstream.Length);
07 fstream.Close();
08 site.RootWeb.Files.Add(documents.RootFolder.Url + "/MyFile.docx", content,
true);
09 SPFile file = site.RootWeb.GetFile(documents.RootFolder.Url + "/MyFile.
docx");
10 file.CheckIn(string.Empty);
12 }
You need to ensure that all users can see the document.
Which code segment should you add at line 11?
A. file.CanOpenFile(true);You have a SharePoint site collection that contains 100 sites. Each site contains 100 lists.
You need to retrieve all item titles from all lists. The data must be retrieved in the minimum amount of time.
Which access method should you use?
A. SPList.ItemsNowadays, 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.