I have custom application page. There are few datepickers, to filter custom list data. When user clicks on Export To Excel ( which is asp:Button ) I need to filter data based on datepickers value, and write it in Excel file, and return file to client. How can I achieve this ? I saw that one of the options is to export SPGridView data to excel, but when I'm using this approach, everytime I'm opening excel file I'm getting warning popup.