未将对象引用设置到对象的实例错误?
好好小妖 2009-03-30 01:04:16 FormView有一按钮,我想把它设置为隐藏,可以总出现未将对象引用设置到对象的实例错误?而且我有Id为NewButton的按钮
this.FormViewTrackInfo.ChangeMode(FormViewMode.Insert);
this.FormViewTrackInfo.DefaultMode = FormViewMode.Insert;
if (this.FormViewTrackInfo.CurrentMode == FormViewMode.Insert)
{
FormView fv = new FormView();
Button bt = (Button)fv.FindControl("NewButton"); bt.Visible = false;
}