在vs2005中新建了个web控件库,代码如下:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
namespace Wrox
{
    public class StaticListBox:WebPart
    {
        private String _labelStartText=" Enter State Name: ";
        TextBox StateInput=new TextBox ();
        ListBox StateContents=new ListBox();        public StaticListBox()
        {
            AllowClose=false;
        }        [Personalizable(),WebBrowsable]
        public String LabelStartText
        {
            get{ return _LabelStartText;}
            set{ _LabelStartText=value;}
        }        protected override void  CreateChildControls()
       {
            Controls.Clear ();            Label InstructionText=new Label();
            InstructionText.BackColor =System.Drawing.Color.LightGray ;
            InstructionText .Font .Name ="Verdana";
            InstructionText .Font.Size =10;
            InstructionText .Font.Bold =true;
            InstructionText .Text =LabelStartText ;
            Controls .Add (InstructionText );            Literal LineBreak=new Literal ();
            LineBreak .Text ="<br/>";
            Controls .Add (LineBreak );            Controls .Add (StateInput );            Button InputButton=new Button();
            InputButton .Text ="Input State";
            InputButton .Click+=this.Button_Click;
            Controls .Add (InputButton);            Literal Spacer=new Literal();
            Spacer.Text ="<p>";
            Controls .Add (Spacer );            Controls .Add (StateContents );            ChildControlsCreated=true;
           }           private void Button1_Click(obejct sender, EventArgs e)
           {
               StateContents.Items.Add (StateInput.Text );
               StateInput .Text =string .Empty ;
               StateInput .Focus ();         }
            }
}   代码没报错,编译时出错:错误 1 找不到类型或命名空间名称“obejct”(是否缺少 using 指令或程序集引用?) C:\Documents and Settings\ccokUser2\My Documents\Visual Studio 2005\Projects\MyStaticListBox\MyStaticListBox\MyStaticListBox.cs 63 39 MyStaticListBox  查看了一下引用了System,System.Drawing,System.Web这三个,是不是还要添加什么引用?