Sreejobs Logo
   For Latest Job Updates  
sreenutech.com Online Exams
Home Govt Jobs IT Fresher Jobs IT Exp Jobs IT Walk-Ins MBA Jobs BPO Jobs Register FAQ’s Post Job Contact Us
Search:
SreeJob Fees   Feeds
Hot Jobs
Welcome Guest
Login | Register
Total No Of Questions: 100.
1) 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?


2) You create custom code to import content to SharePoint sites.You create a custom site definition by using Microsoft Visual Studio 2010.You need to ensure that when a new site that uses the site definition is created, the custom code executes after the site is created. Which class should you add to the project?


3) 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?void?CreateNewSite_Click(object?sender,?EventArgs?e) { SPSite site = SPContext.Current.Site; SPWeb?web?=?site.AllWebs.Add(SiteNameTextBox.Text,?SiteTitleTextBox.Text, SiteDescriptionTextBox.Text,?0,?SPWebTemplate.WebTemplateSTS,?false,?false); } 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?


4) You have a Web application that contains the following code segment. void?CreatingSPSite() { SPSite?siteCollection?=?null; try { siteCollection?=?new?SPSite("http://contoso.com"); } finally { } } You need to prevent the code segment from causing a memory leak. Which line of code should you add to the code segment?


5) You 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.) 01private?void?keywordQueryExecute(string?searchAuthor) 02{ 03 KeywordQuery?kRequest?=?new?KeywordQuery(ServerContext.Current); 04? 05 kRequest.QueryText?=?strQuery; 06 ResultTableCollection?resultTbls?=?kRequest.Execute(); 07} Which code segment should you add at line 04?


6) You need to add a new field to a provisioned content type. You must propagate the field to child lists and child content types.What should you use?


7) You need to convert a user control named Control.ascx to a SharePoint Web Part. The Web Part must be packaged as a user solution.What should you do?


8) You create a custom list named Products.You need to perform a Representational State Transfer (REST) query that returns products 30 to 39.Which URL should you use?


9) 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.) 01SPSecurity.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} 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?


10) You create a Feature named Feature1. Feature1 is activated in a SharePoint site. You create a Web Part that contains the following code. SPSite?site?=?new?SPSite("http://intranet/site1"); SPWeb web?=?site.OpenWeb(); SPFeatureDefinition feature?= SPFarm.Local.FeatureDefinitions["Feature1"]; You need to modify the Web Part to activate Feature1 in Site1 only. Which code segment should you add to the Web Part?
Page 1 of 10
Home | Register for Job Updates | Contact Us