I have below code in asp.net
GetObjectResponse resp = Media.ReadS3Object("data", strKey);
StreamReader sr = new StreamReader(resp.ResponseStream);
//Prompt download:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = resp.ContentType; // "text/csv;";
HttpContext.Current.Response.AppendHeader("Content-Disposition", string.Format("attachment; filename={0}", fname));
HttpContext.Current.Response.BinaryWrite(UTF8Encoding.Convert(Encoding.UTF8, Encoding.Unicode, Encoding.UTF8.GetBytes(sr.ReadToEnd())));
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
it downloads file, how can I achieve samething through mvc. Thanks