private void Button1_Click(object sender, System.EventArgs e)
{
int i=0;
StreamReader rl=new StreamReader((System.IO.Stream)File.OpenRead(Server.MapPath("../tcpj/dataup/")+curnam),System.Text.Encoding.Default);
while(rl.Peek()>-1)
{
string rlstr=rl.ReadLine();
i=i+1;
if(rlstr.Split(' ').GetLength(0)!=17)
{
/////////////////////////////////////////////////////////////////////////////////////////
this.Response.Write("<script>alert('文本第"+i.ToString()+"行格式非法!');;</script>");
////////////////////////////////////////////////////////////////////////////////////////
可将上一行加入替换代码
rl.Close();
Button4.Enabled=true;
return;
}

}
string ss="update upfile set chkflag=1 where upfile_id ="+uid;
SQL.ExcSQL(ss);
this.Response.Write("<script>alert('文本检查完毕,可以导入!');;</script>");
rl.Close();
fillcommon();
}