文本文件  txt么?
直接读取 显示到label就行了 而且不用流..file下有几个static的方法很不错的

解决方案 »

  1.   

          
    //读出来以后不久好展示了嘛
       System.IO.StreamReader StreamReader = System.IO.File.ReadAllText("地址", System.Text.Encoding.UTF8);
                StreamReader.ReadLine();
      

  2.   

    比如说你的文件在 app_data/text 目录下,叫做abc.txt。你的页面上<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton>你可以写这个点击事件处理protected void LinkButton1_Click(object sender, EventArgs e)
    {
        var path = Server.MapPath("~/app_data/text/abc.txt");
        Response.ContentType = "text/plain";
        Response.TransmitFile(path);
        Response.End();
    }或者写为protected void LinkButton1_Click(object sender, EventArgs e)
    {
        var path = Server.MapPath("~/app_data/text/abc.txt");
        Response.ContentType = "text/plain";
        Response.AddHeader("Content-Disposition", "attachment;filename=abc.txt");
        Response.TransmitFile(path);
        Response.End();
    }
      

  3.   

    找一本入门书,看看上面有没有教你“下载文件”的功能?!在网上搜索asp.net下载方面的文章,看看asp.net的技术是什么。既然使用asp.net开发平台,就要多懂一点asp.net使用方法。当然前提是还要懂 web 的原理。