EnsurepassQUESTION 131 You create a SharePoint site by using the Document Center site template. You need to ensure that all documents added to the site have a document ID. The document ID must include the date that the document was added to the site. What should you do?   A. Modify the DocIdRedir.aspx page. B. Modify the Onet.xml file of the site. C. Register a class that derives from DocumentId. D. Register a class that derives from DocumentIdProvider.   Correct Answer: D   Read more [...]
EnsurepassQUESTION 121 You develop a custom approval workflow. The workflow uses the CreateTask class to assign tasks to a user named User1. A list called Tasks stores the tasks. Other workflows and users use the Tasks list. You need to ensure that the tasks assigned to User1 can only be viewed by User1. What should you do?       QUESTION 122 You need to create a Web Part that displays all of the permission levels of the current subsite. Which collection should you use?   Read more [...]
EnsurepassQUESTION 111 You create a custom page layout that contains the following code segment. (Line numbers are included for reference only.) 01 Please enter a number: 02 <SharePointWebControls:InputFormTextBox ID="NumberTextBox" runat="server"/> 03 You need to prevent the page from being saved if NumberTextBox is empty. Which code segment should you add at line 03?     A. <script type="javascript">if(document.getElementById('NumberTextBox').value= '') return false;</script> Read more [...]
EnsurepassQUESTION 101 You add a delegate control to the <head> section of a custom master page. You reference a default script file by using the delegate control. You need to ensure that the delegate control meets the following requirements: Prevents other developers from deleting the default script reference Provides developers with the ability to add additional script references Provides developers with the ability to change the order of the script references Which property should Read more [...]
EnsurepassQUESTION 91 You have a custom user profile property named MyProperty. You need to create a Web Part that displays the value of MyProperty for the current user. Which code segment should you use?     A. string profile = SPContext.Current.Web.Properties("CurrentUser/MyProperty"); B. string profile = SPContext.Current.Web.Users["MyProperty"].ToString(); C. UserProfileManager profileManager = new UserProfileManager(SPServiceContext.Current);UserProfile userProfile = profileManager.GetUserProfile(SPContext.Current.Web.CurrentUser.LoginName);string Read more [...]
EnsurepassQUESTION 81 You need to create a Web Part that creates a copy of the out-of-the-box Contribute permission level. Which code segment should you implement in the Web Part?   A. SPRoleDefinition myRole = new SPRoleDefinition();myRole.Name = "Contribute";SPContext.Current.Web.RoleDefinitions.Add(myRole); B. SPRoleDefinition myRole = new SPRoleDefinition (SPContext.Current.Web.RoleDefinitions["Contribute"]); myRole.Name = "MyContribute"; SPContext.Current.Web.RoleDefinitions.Add(myRole); Read more [...]
Ensurepass A. Rename WP1.webpart as Corporate.webpart. B. In WP1.webpart, change the Title property to Corporate. C. In the constructor of WP1.cs, add the following line of code: Page.Title="Corporate"; D. In the Elements.xml file, change the Name property of the <File> element to Corporate.   Correct Answer: B Explanation/Reference: MNEMONIC RULE: "Title property to Corporate" Web Parts Control Description Files http://msdn.microsoft.com/en-us/library/ms227561.aspx     Read more [...]
EnsurepassQUESTION 61 You have a SharePoint site that has the URL http://contoso.com/hr. You are creating a new Web Part. You need to create a reference to the current subsite without having to dispose of any returned objects. Which code segment should you use?     A. SPSite siteCollection = new SPSite("http://www.contoso.com");SPWebCollection site = siteCollection.AllWebs; B. SPSite siteCollection = new SPSite("http://www.contoso.com");SPWeb site = siteCollection.RootWeb; C. SPSite Read more [...]
EnsurepassQUESTION 51 You use a third-party site definition to create SharePoint sites. You need to add a Web Part to the home page of the site definition. Which file should you modify?   A. default.master B. Onet.xml C. Sp.xml D. web.config   Correct Answer: B Explanation/Reference: MNEMONIC RULE: "third-party site definition = Onet.xml" You can perform the following kinds of tasks in a custom Onet.xml file that is used for either a custom site definition or a custom web template: Read more [...]
EnsurepassQUESTION 41 You need to connect two Web Parts by using the IWebPartRow interface. Which method should you use?   A. DataItem B. GetFieldValue C. GetRowData D. GetTableData   Correct Answer: C Explanation/Reference: MNEMONIC RULE: "iWebPartRow = GetRowData" Returns the data for the row that is being used by the interface as the basis of a connection between two WebPart controls. IWebPartRow.GetRowData Method http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.iwebpartrow.getrowdata.aspx Read more [...]
EnsurepassQUESTION 31 You need to create a Web control that displays an ASCX control. Which event should you use to render the Web control?   A. CreateChildControls B. LoadControlState C. SaveViewState D. SetDesignModeState   Correct Answer: A Explanation/Reference: MNEMONIC RULE: "display ASCX control = CreateChildControl" BaseFieldControl.CreateChildControls Method http://msdn.microsoft.com/en-us/library/ microsoft.sharepoint.webcontrols.basefieldcontrol.createchildcontrols.aspx Read more [...]