FormView.FindControl()返回null直到DataBind()

aba*_*hev 3 .net asp.net formview asp.net-2.0 findcontrol

为什么方法在调用之前FindControl()返回.nullFormViewDataBind()

之后它会正确返回所有内容?

有什么解决方法?

呼叫DataBind()的第一次调用之前FindControl()?

dev*_*vio 5

显式调用DataBind(),或将代码放在FormView的DataBound事件中.