Posted on: 7/21/2015 5:34:39 AM | Views : 774

Hi,

This is pdf button click Action method in controler to export data to pdf file is work but open in this page. i need to download that file not open in click on PDF button.
public FileStreamResult ExportPDF() { List<UserMaster> all = new List<UserMaster>(); all = db.UserMasters.ToList(); WebGrid grid = new WebGrid(source: all, canPage: false, canSort: false); string gridHtml = grid.GetHtml( columns: grid.Columns( grid.Column("UserName", "User Name"), grid.Column("Password", "Password"), grid.Column("FullName", "Full Name"), grid.Column("EmailId", "Email"), grid.Column("IsActive", "Is Active?"))).ToString(); string exportDa ...

Go to the complete details ...