Welcome to TestSimulate

Pass Your Next Certification Exam Fast!

Everything you need to prepare, learn & pass your certification exam easily.

365 days free updates. First attempt guaranteed success.

Microsoft TS: Office SharePoint Server, Application Development (available in 2010) (70-573) Free Practice Test

Question 1
You need to create a Web Part that adds a term set to the current SharePoint site collection's term store.
You write the following code segment. (Line numbers are included for reference only.)
01 System.Web.UI.WebControls.TextBox txtBoxTermSetToAdd = new
System.Web.UI.WebControls.TextBox();
02 TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
03 TermSet addedTerm = session.TermStores[0].Groups
["MyNewTermStore"].CreateTermSet(txtBoxTermSetToAdd.Text);
04
Which code segment should you add at line 04?

Correct Answer: B
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 2
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 SPSite currentSite = new SPSite("http://intranet");02 SearchContext context = SearchContext.GetContext(currentSite);03 Schema schema = new Schema(context);
Which code segment should you add to the application?

Correct Answer: D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 3
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.)
01 SPSecurity.RunWithElevatedPrivileges(delegate()02 {
03 04 05
try{
06 07 08 09 10
LblVisits.Text = site.Usage.Visits.ToString();}finally{
11
}
12 });
Which code segment should you add at line 05?

Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 4
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?

Correct Answer: B
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 5
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?

Correct Answer: C
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 6
You plan to create a Web Part for a SharePoint site.
You need to ensure that the Web Part can send data to other Web Parts in the site.
What should you do?

Correct Answer: B
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 7
You are developing an application page.
You need to create a pop-up window that uses the ECMAScript object model.
Which namespace should you use?

Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 8
You need to disable the CriticalExceptionCount measure for all user solutions.
You write the following code segment. (Line numbers are included for reference only.)
01 SPUserCodeService userCode = SPUserCodeService.Local;
02 SPResourceMeasureCollection measures = userCode.ResourceMeasures;
03 SPResourceMeasure measure = measures["CriticalExceptionCount"];
04
05 measure.Update();
Which code segment should you add at line 04?

Correct Answer: D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 9
You have a SharePoint site collection that contains 100 subsites.
You plan to create a Web Part. The Web Part will be deployed to each subsite.
You need to ensure that the Web Part retrieves all of the files in the root directory of the current subsite.
You write the following code segment. (Line numbers are included for reference only.)
01 SPSite site = SPContext.Current.Site;02 SPWeb web = SPContext.Current.Web;03
Which code segment should you add at line 03?

Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 10
You have a Web Part that causes an error.
You need to ensure that you can view the trace history in the Trace.axd file.
What should you configure in the web.config file?

Correct Answer: D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).