PrepAway - Latest Free Exam Questions & Answers

Which code segments should you include in Target 1, Target 2 and Target 3 to implement the ExecuteResult metho

HOTSPOT
You are developing an ASP.NET MVC web application that enables users to open Microsoft Excel
files.
The current implementation of the ExcelResult class is as follows.


You need to enable users to open Excel files.
You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to implement the
ExecuteResult method? To answer, select the appropriate option or options in the answer area.


PrepAway - Latest Free Exam Questions & Answers

Answer: See the explanation

Explanation:

Target 1:
Name: AcceptTypes
Synopsis: stringArray = Request.AcceptTypes
Return s a String array containing the Multipurpose Internet Mail Extension (MIME) types accepted
by the client. You can use this property to determine whether a client can accept certain response
types, including application types such as Word or Excel, which are supported only by Internet
Explorer.
Target 2, Target 3:
Example:
Response.AddHeader(“content‐disposition”, “attachment; filename=MyExcelFile.xls”);
Response.ContentType = “application/ms‐excel”;

Export data to Excel file with ASP.NET MVC 4 C# is rendering into view
http://stackoverflow.com/questions/16346227/export‐data‐to‐excel‐file‐with‐asp‐net‐mvc‐4‐c‐
sharp‐is‐rendering‐into‐view

One Comment on “Which code segments should you include in Target 1, Target 2 and Target 3 to implement the ExecuteResult metho


Leave a Reply