天天看點

asp.net中打開檔案的方法Response.WriteFile();

<%@ Page Language="c#" %>

<html>

<head>

</head>

<body>

<h2>Response.WriteFile()

</h2>

<%;

string FileName;

//make sure the text file is in the correct place.

FileName = Request.PhysicalApplicationPath + "demo.asp";

Response.WriteFile(FileName);

%>

</body>

</html>