System.NullReferenceException:“未将对象引用设置到对象的实例
private void aa()
{
wbr.Url = new Uri("http://www.abc.com");
this.wbr.Document.GetElementById("textbox1").Focus();//这里报错System.NullReferenceException:“未将对象引用设置到对象的实例
}
----------------------------------------------------------------------
private void aa(object sender, EventArgs e)
{
wbr.Url = new Uri("http://www.abc.com");
this.wbr.Document.GetElementById("textbox1").Focus();
}
这样就正常,请问为什么啊??