You are creating a custom content type named CT1. You need to use a Feature to add an existing site column named SiteCol1 to CT1. Which code segment should you include in the Feature?
You have a SharePoint site collection that has the URL http://contoso/sites/finance. You are creating a Microsoft .NET Framework console application that will use the SharePoint client object model to create a site in the site collection. The
application contains the following code segment. (Line numbers are included for reference only.)
01Dim cCtx As New ClientContext("http://contoso/sites/finance")
02Dim root As Web = cCtx.Site.RootWeb
03cCtx.Load(root)
04Dim webInfo As New WebCreationInformation()
05webInfo.Title = "site1"
06webInfo.Url = "site1"
07webInfo.WebTemplate = "MPS#2"
08root.Webs.Add(webInfo)
10cCtx.Dispose()
You need to ensure that the application creates the site. Which code segment should you add at line 09?
A. cCtx.ExecuteQuery()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.RunWithElevatedPrivileges(delegate()
02 {
03 SPSite currSite = SPContext.Current.Site;
04 SPWeb currWeb = SPContext.Current.Web;
05 using (SPSite eSite = new SPSite(currSite.ID))
06 {
07 using (SPWeb eWeb = eSite.OpenWeb(currWeb.ID))
08 {
09 eWeb.AllowUnsafeUpdates = true;
10 currWeb.Description = "Test";
11 currWeb.Update();
12 eWeb.AllowUnsafeUpdates = false;
13 }
14 }
15 });
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?
A. Remove lines 09 and 12.You have a Web page named ShowMessage.aspx.
You create a new Web page.
You need to display the content from ShowMessage.aspx in an IFRAME on the new Web page. You must achieve this goal by using the minimum amount of effort.
What should you do?
A. Add a PageView Web Part that displays ShowMessage.aspx.You have a SharePoint Web application that has the URL http://intranet.
You are creating a Microsoft .NET Framework application that will display the title of the SharePoint Web application and will execute outside of the SharePoint server.
You create a textbox named textBoxTitle.
You write the following code segment. (Line numbers are included for reference only.)
01 ClientContext context = new ClientContext("http://intranet"); 03 Web site = context.Web;
04 context.Load(site); 06 textBoxTitle.Text = site.Title;
You discover that line 04 generates an error.
You need to ensure that the .NET application displays the title of the SharePoint Web application in textBoxTitle.
What should you do?
A. Add the following line of code at line 02: context.ExecuteQuery();You create a workflow named WF1. WF1 is attached to a list named List1.
You need to receive an e-mail notification if WF1 is postponed.
What should you do?
A. Use a HandleExternalEvent activity in WF1.You have a helper method named CreateSiteColumn that contains the following code segment.
static void CreateSiteColumn ( SPWeb web, string columnName )
{
}
You need to add a new site column of type Choice to a SharePoint site by using the helper method.
Which code segment should you include in the helper method?
A. SPField field = new SPFieldChoice(System.web.Lists[0].Fields, columnName);You need to create a custom application that provides users with the ability to create a managed property. The managed property name must be specified in the args[1] parameter.
You write the following code segment for the application. (Line numbers are included for reference only.)
01 Dim currentSite As New SPSite("http://intranet")
02 Dim context As SearchContext = SearchContext.GetContext(currentSite) 03 Dim schema As New Schema(context)
Which code segment should you add to the application?
A. context.SearchApplication.CrawlStores.Create(args(1))You need to create a Web Part that will store and retrieve information for the current subsite. Which object should you use?
A. SPContext.Current.Site.RootWeb.AllPropertiesYou create a Web Part that contains the following code segment. (Line numbers are included for reference only.)
01 Public Class WebPart1
02 Inherits WebPart 04 Public Sub New()
05 MyBase.New 07 End Sub 09 Protected Overrides Sub CreateChildControls()
10 Dim clickButton As Button = New Button 12 MyBase.CreateChildControls 13 End Sub 15 Protected Overrides Sub RenderContents
(ByVal writer As HtmlTextWriter) 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?
A. Delete line 12.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.