if(!ispostback) { 
if(Request.QueryString["TextName"]!=null) 

string sName = Page.Request.QueryString["TextName"].ToString(); 
        string path = Server.MapPath("~\\App_Data\\" + sName + ".Txt"); 
        System.IO.StreamReader reader = new System.IO.StreamReader(path, System.Text.Encoding.Default); 
        this.labHelp.Text = reader.ReadLine(); 
        this.txtRead.Text = reader.ReadToEnd(); 
        reader.Close(); } 
} 运行出现下面的乱码? 鈥?onlineshop鈥濆簲鐢ㄧ▼搴忎腑鐨勬湇鍔″櫒閿欒銆?hr width=100% size=1 color=silver> 
HTTP 閿欒 404 - Not Found銆?/i> -------------------------------------------------------------------------------- 
鐗堟湰淇℃伅: ASP.NET Development Server 8.0.0.0 

解决方案 »

  1.   

    System.IO.StreamReader reader = new System.IO.StreamReader(path, System.Text.Encoding.Default); 有问题
      

  2.   

    乱码试下:System.IO.StreamReader reader = new System.IO.StreamReader(Path,   System.Text.Encoding.GetEncoding("GB2312"));
      

  3.   

    你吧.txt文件的内容编辑一下,只打2个字,“测试”,看下
    你可以把txt文件的内容粘上来看看
      

  4.   

    string path = Server.MapPath("App_Data")+"\\" + sName + ".Txt"; 
    试试。你的错误是你要访问的资源没有找到
      

  5.   

    看看你的path 是不是对的哦??
    跟踪下...
      

  6.   

    string path = Server.MapPath("App_Data")+"\\" + sName + ".Txt"; 
    那你看看Response.Write(path);显示的跟你要的路径是否是一致的。