Hello, I´m new in the forum. I´m kind of starter in this worl of making web applications

. I need your help for the following: On my web application there will be a Button that when clicking it, the result of a query (made to a sql 2008 table) will be exported to txt. file. The user will decide the name and the location of that txt. file. Can you help me?
I´m using SQL server 2008 Express and Visual Web Developer 2008 Express.
Regards