How to export query results into csv or text file
give me code
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Anubhav ChaudharyRank #29 · 42K reputationPosted Jan 16, 2015, 9:38 PM EST
You will get code from here:
http://www.c-sharpcorner.com/UploadFile/cd7c2e/export-sql-data-to-excel-using-Asp-Net/
You just need to make one change in the code, just replace
Response.ContentType = "application/excel";
with this
Response.ContentType = "application/vnd.text";
rakesh mhatre52 reputationPosted Jan 16, 2015, 10:04 PM EST
Thank u
Anubhav ChaudharyRank #29 · 42K reputationPosted Jan 16, 2015, 10:19 PM EST
Why are you posting your question on someone else question?? Make a new question and ask your problem over there.