Q1. - (Topic 4)
You are developing a controller for an ASP.NET MVC application that manages message board postings.
The security protection built in to ASP.NET is preventing users from saving their HTML.
You need to enable users to edit and save their HTML while maintaining existing security protection measures.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q2. - (Topic 3)
You need to ensure that developers can connect to a Windows Azure role by using RDP.
What should you do?
A. Export a certificate without a private key. Upload the .cer file to the Management Certificates section on the Azure Management Portal.
B. Export a certificate with a private key. Upload the .pfx file to the Management Certificates section on the Azure Management Portal.
C. Export a certificate without a private key. Upload the .cer file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal.
D. Export a certificate with a private key. Upload the .pfx file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management Portal.
Answer: D
Q3. - (Topic 4)
You are developing an ASP.NET MVC web application that includes the following method.
You need to test the AccountBalance method. Which unit test should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Explanation:
http://msdn.microsoft.com/en-us/magazine/cc163665.aspx http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.areequal(v=vs.110).aspx
Q4. HOTSPOT - (Topic 4)
You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiple cultures.
To set the culture, the application must use the AcceptLanguage header field value sent by the client browser.
You need to ensure that the application can set the culture. You have the following markup in the web.config file:
Which markup segments should you include in Target 1, Target 2 and Target 3 to complete the markup? (To answer, select the appropriate options in the answer area.)
Answer:
Q5. - (Topic 4)
You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiple cultures.
The application contains three resource files in the Resources directory:
ProductDictionary.resx
ProductDictionary.es.resx
ProductDictionary.fr.resx
Each file contains a public resource named Currency with the localized currency symbol.
The application is configured to set the culture based on the client browser settings.
The application contains a controller with the action defined in the following code segment. (Line numbers are included for reference only.)
You need to set ViewBag.LocalizedCurrency to the localized currency contained in the resource files.
Which code segment should you add to the action at line 03?
A. ViewBag.LocaIizedCurrency = Resources.ProductDictionary.Currency;
B. VievBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject("ProductDictionary", "Currency", new System.Globalization.CultureInfo(Men"));
C. VievBag.LocalizedCurrency = HttpContext.GetLocalResourceObject("ProductDictionary", "Currency");
D. ViewBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject("ProductDictionary", "Currency");
Answer: A
Q6. - (Topic 4)
You are designing an MVC web application.
The view must be as simple as possible for designers who do not have a technical
background.
You need to combine two existing models to meet the requirement.
Which component of the MVC framework should you use?
A. View
B. View Model
C. Controller
D. Model
Answer: B
Q7. - (Topic 1)
You need to make all of the rows in the table bold in the Views/RunLog/GetLog.cshtml view.
Which code segment should you use?
A. Table > th:last-child { font-weight: bold; }
B. Table+first-child{ font-weight: bold; }
C. Table>tr>th:nth-child{2){font-weight: bold; }
D. Table > tr {font-weight: bold;}
Answer: D
Q8. - (Topic 2)
You need to ensure that new customers enter a valid email address.
Which code should you use? (Each correct answer presents part of the solution. Choose all that apply.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A,D
Q9. DRAG DROP - (Topic 4)
You are developing an ASP.NET MVC application in Visual Studio 2012. The application contains sensitive bank account data.
The application contains a helper class named SensitiveData.Helpers.CustomEncryptor.
The application must not display AccountNumber in clear text in any URL.
You need to build the view for the GetAccounts action.
How should you build the view? (To answer, drag the appropriate code segment to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
Q10. HOTSPOT - (Topic 4)
You are developing an ASP.NET MVC application. The layout page of the application references the jQuery library. You develop a view that uses the layout page. The view includes the following markup:
The application includes the following class:
When a user clicks the button, an AJAX call must retrieve the partial view and append it to the newBooks div element.
You need to implement the AJAX request.
How should you complete the relevant code? To answer, select the appropriate code segment from each list in the answer area.
Answer: