In asp.net mvc project how can i work iframe to show a document file? I tried to do below the code like that,but when i run the project file has download...why??
 public FileStreamResult GetPDF()
        {
            FileStream fs = new FileStream(Server.MapPath(@"~/File/SegmentAdd.txt"), FileMode.Open, FileAccess.Read);
            return File(fs,"application/pdf","SegmentAdd.txt");         
        }
      <iframe src="@Url.Action("GetPDF","Home")"  width="90%" height="90%"></iframe>
 
    