Download File by Selecting Item in DataGrid
Posted on 2006-07-13
I am new to ASP .NET so hopefully I can ask my question clearly. I have a datagrid with the SelectButton enabled on my page. I am trying to use the Datagrid_SelectedIndexChanged event to:
1. Retrieve the primary key of the selected record in the datagrid
2. Query my database for the file path associated with that primary key
3. Retrieve the file using the path and display the file dialogue box so the user can download the file to their machine.
I've been researching for hours and can't seem to find an example that pulls these three steps together. Any help is appreciated.