-1
'다운로드 버튼'에이 코드가 있습니다. 예, 메모장에 다운로드되지만 원하는 것은 사용자가 '다운로드 버튼'을 클릭 할 때 SAVE-AS 파일 대화 상자가 나타나 file.please 도움말을 저장하고 이름을 바꿀 수 있습니다!데이터 격자보기의 열 하나를 메모장 (.txt)으로 내 보냅니다.
protected void btn_export_Click(object sender, EventArgs e)
{
TextWriter sw = new StreamWriter(@"C:\SumTotal\file11.txt");
int rowcount = GridView1.Rows.Count;
for (int i = 0; i < rowcount - 1; i++)
{
sw.WriteLine(GridView1.Rows[i].Cells[28].Text.ToString() + "\t");
}
sw.Close(); //Don't Forget Close the TextWriter Object(sw)
Response.Write("Data Successfully Exported");
}