protected void Button1_Click(object sender, EventArgs e)
{
Response.ContentType = "text/txt";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + "file.txt");
Response.Write(@"C:\temp.txt");
Response.End();
}
Привет, предыдущий код позволяет мне передать один файл в один клик, выскакивают «Сохранить как» диалогового окна.Asp.Net инициировать передачу 2 файлов с «Сохранить как» диалогового
Я хотел бы передать 2 файла в пределах по щелчку, выскакивают 2 «Сохранить как» диалоговых окон
я мог бы слишком упрощенный подход, потому что ниже не работает, он просто приносит один «Сохранить как 'box
protected void Button1_Click(object sender, EventArgs e)
{
Response.ContentType = "text/txt";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + "file.txt");
Response.Write(@"C:\temp.txt");
Response.End();
Response.ContentType = "text/txt";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + "file.txt");
Response.Write(@"C:\temp.txt");
Response.End();
}
Благодарим за помощь!
Вы можете закрепить два файла перед отправкой их клиенту. – David