我写的用户控件 
但是在加载取属性的时候报错:
WebUserControl1 sc = (WebUserControl1)this.LoadControl("WebUserControl1.ascx");
int mm=sc.NodeID.Count;未将对象引用设置到对象的实例。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误: 
行 44:  {
行 45:  WebUserControl1 sc = (WebUserControl1)this.LoadControl("WebUserControl1.ascx");
行 46:  int mm=sc.NodeID.Count; 
public class WebUserControl1 : System.Web.UI.UserControl
{
protected Microsoft.Web.UI.WebControls.TreeView TreeView1;
private  IList m_NodeID;
private   IList m_NodeName;
private  IList m_NodePath;
private static WebUserControl1 instance; 
public static WebUserControl1 Instance 

get  

if (instance == null) 

instance = new WebUserControl1(); 

return instance; 


public   IList NodeID
{
get { return this.m_NodeID;} set { this.m_NodeID = value;}
} public  IList NodeName
{
get { return this.m_NodeName;} set { this.m_NodeName = value;}
} public   IList NodePath
{
get { return m_NodePath;} set { this.m_NodePath = value;}
}
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if(!Page.IsPostBack)
{

TreeView1.Attributes.Add("oncheck","tree_oncheck(this)"); }

}