Question: how to export gridview data to text file in c#?
Answer: private void ExportGridToText()
{
Bindgrid();
Response. Clear();
Response. Buffer = true;
Response. AddHeader("content-disposition", "attachment;filename=Vithal_Wadje. txt");
Response. Charset = "";
Response. ContentType = "application/text";