gpt4 book ai didi

.net - FormView.FindControl() 在 DataBind() 之前返回 null

转载 作者:行者123 更新时间:2023-12-01 09:39:29 24 4
gpt4 key购买 nike

为什么方法 FindControl() 在调用 DataBind() 之前在 FormView 上返回 null

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

有什么解决方法?

在第一次调用 FindControl() 之前调用 DataBind() ?

最佳答案

要么显式调用 DataBind(),要么将代码放在 FormView 的 DataBound 事件中。

关于.net - FormView.FindControl() 在 DataBind() 之前返回 null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2171427/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com