FormView.FindControl()返回null,直到的DataBind() [英] FormView.FindControl() returns null until DataBind()

查看:255
本文介绍了FormView.FindControl()返回null,直到的DataBind()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么方法的FindControl()收益 FormView控件直到通话的DataBind()

Why method FindControl() returns null on FormView until call DataBind().

之后,它正确返回的一切吗?

After that it returns everything correctly?

什么解决办法有哪些?

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

Call DataBind() before first call of FindControl() ?

推荐答案

显式调用DataBind(),或将您的code FormView控件的数据绑定的事件。

Either explicitly call DataBind(), or place your code in the DataBound event of the FormView.

这篇关于FormView.FindControl()返回null,直到的DataBind()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆