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 SharePoint site collection. The root Web of the site collection has the URL http://intranet.You plan to create a user solution that will contain a Web Part. The Web Part will display the title of the root Web. You write the following code segment for the Web Part. (Line numbers are included for reference only.) 01SPSite?currentSite?=?new?SPSite("http://intranet"); 02? 03Label?currentTitle?=?new?Label(); 04currentTitle.Text?=?currentSite.RootWeb.Title; You add the Web Part to a page in the root Web and receive the following error message: “Web Part Error:Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.” You need to prevent the error from occurring.What should you do?


2) You have several SharePoint sites.You plan to load a custom script in all pages of the sites. You need to ensure that you can activate or deactivate the script at the site level. What should you do?


3) You have a SharePoint site that contains 10 lists.You need to prevent a list named List1 from appearing on the Quick Launch navigation bar.What should you configure?


4) You have a SharePoint list named Assets that contains 1,000,000 items. The list contains a column named Urgent. Approximately 100 items have a value of True in their Urgent column. You use the following line of code to retrieve the Assets list. SPList?assetsList?=?currentWeb.Lists["assets"]; You need to retrieve all of the items in the list that have a value of True in their Urgent column. You must retrieve the items in the minimum amount of time. What should you do?


5) You have a list named Projects that contains a column named ClassificationMetadata. You need to create a Web Part that updates the ClassificationMetadata value to NA for each item in the Projects list.You write the following code segment. (Line numbers are included for reference only.) 01foreach?(SPListItem?currentItem?in?SPContext.Current.Web.Lists["Projects"].Items) 02{ 03? 04} Which code segment should you add at line 03?


6) You need to programmatically add a user named User1 to a group named Group1. You write the following code segment. (Line numbers are included for reference only.) 01string?login?=?"User1";? 02string?grpName?=?"Group1";? 03SPUser?user?=?SPContext.Current.Web.EnsureUser(login); 04SPGroup?group?=?SPContext.Current.Web.Groups[grpName]; 05? 06group.Update(); Which code segment should you add at line 05?


7) You need to create a Web control that displays an ASCX control. Which event should you use to render the Web control?


8) You create a Web Part that contains the following code segment. (Line numbers are included for reference only.) 01public?class?WebPart1?:?WebPart 02 { 03 public?WebPart1(){} 04? 05 protected?override?void?CreateChildControls() 06 { 07 Button?clickButton?=?new?Button(); 08? 09 base.CreateChildControls(); 10 } 11? 12 protected?override?void?RenderContents(HtmlTextWriter?writer) 13 { 14? 15 base.RenderContents(writer); 16 } 17 } You discover that the clickButton button does not appear.You need to ensure that clickButton appears. What should you do?


9) 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.) 01SPSecurity.RunWithElevatedPrivileges(delegate() 02?{ 03 try 04 { 05 06 LblVisits.Text?=?site.Usage.Visits.ToString(); 07 } 08 finally 09 { 10 … 11 } 12?} 13); Which code segment should you add at line 05?


10) You need to create a Web Part that displays all social tags entered by users. Which code segment should you use?
Page 1 of 10
Home | Register for Job Updates | Contact Us