()
在代碼隱藏頁的 Page_Load 事件中
在代碼隱藏頁的 Page_Load 事件中
private void Page_Load(object sender
{
//Set the appropriate ContentType
Response
//Get the physical path to the file
string FilePath = MapPath(
//Write the file directly to the HTTP content output stream
Response
Response
}
From:http://tw.wingwit.com/Article/program/net/201311/12534.html