ASP.net ASCX and ASPX transfering data from one to the other
<p>I have this page, shown below. In the ASCX file, the data is generated using a DataGrid in which a user searches for fields and it displays results based on input criteria. This is using a stored procedure and parameters to perform this search. It then returns the results, populates a datagrid, now my question is how would I go about in my ASPX page having my disk icon allow a user to download a CSV of the data that has been returned in the ASCX page. I obviously need to run a command to generate the CSV file from the database, which I have all the code for, but my question really is how do I know what the user has searched for, or what results were returned I guess best put. Is this possible? </p>

<p><img src="http://i.stack.imgur.com/n2QtL.png" alt="enter image description here"></p>
