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
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
你可以把txt文件的内容粘上来看看
试试。你的错误是你要访问的资源没有找到
跟踪下...
那你看看Response.Write(path);显示的跟你要的路径是否是一致的。