网页中打印文本文件
protected void Page_Load(object sender, EventArgs e)
{
string path = Server.MapPath("App_Data\\ppp.txt");
System.IO.StreamReader read = new System.IO.StreamReader(path, System.Text.Encoding.Default);
this.Label1.Text = read.ReadLine();
this.Label2.Text = read.ReadToEnd();
read.Close();
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script>window.print()</script>");
}
天道酬勤,厚积薄发。
君子之行,静以修身,俭以养德。
非淡泊无以明志,非宁静无以致远。
如有恒,何须三更起,半夜眠;最怕莫,三天打鱼两天晒网,竹篮打水一场空。