using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
//下面两个是我添加的
using System.IO;
using System.Text;namespace KTMS
{
/// <summary>
/// test 的摘要说明。
/// </summary>
public class test : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{    
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);}
#endregionprivate void Button1_Click(object sender, System.EventArgs e)
{
try
{
FileInfo fi = new FileInfo(TextBox1.Text);
if(!fi.Exists)
{
Label1.Text="该文件不存在!";
DirLabel.Visible = false;
LengthLabel.Visible = false;
CreationTimeLabel.Visible = false;
LastWriteTimeLabel.Visible = false;
AttributesLabel.Visible = false;
DirLabel.Text="文件位置:"+fi.DirectoryName;
LengthLabel.Text="文件大小:"+fi.Length+"字节";
CreationTimeLabel.Text="文件创建时间:"+fi.CreationTime;
LastWriteTimeLabel.Text="最后修改时间:"+fi.LastWriteTime;
AttributesLabel.Text="文件属性:"+fi.Attributes;
}
else
{
Label1.Text="获取文件信息成功,内容如下:";
DirLabel.Visible = true;
LengthLabel.Visible = true;
CreationTimeLabel.Visible = true;
LastWriteTimeLabel.Visible = true;
AttributesLabel.Visible = true;}
}
catch(Exception ee)
{
Label1.Text="获取文件信息失败,原因如下:"+ee.ToString();
}
finally{}
}
}
}错误提示:
  找不到类型或命名空间名称“DirLabel”(是否缺少 using 指令或程序集引用?)这是CS代码,请大家帮我看看,错在哪儿?