Question
Selection List
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.
public class ExcelResult:ActionResult
{
You need to enable users to open Excel files. How should you implement the ExecuteResult method?
(To answer, select the appropriate options in the answer area.)
{
public string path {get;set;}
public override ExecuteResult(ControllerContext context)
{
}
public override ExecuteResult(ControllerContext context)
{
...
}
var response = context.HttpContext.Response;
var request = context.HttpContext.Request;
if (canProcess)
{
var request = context.HttpContext.Request;
if (canProcess)
{
response.Clear();
response.WriteFile(context.HttpContext.Server.MapPath(Path));
}
response.WriteFile(context.HttpContext.Server.MapPath(Path));