FormView.FindControl() returns null until DataBind()

后端 未结 5 2022
轻奢々
轻奢々 2020-12-19 23:24

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

After that it returns everything correct

5条回答
  •  一整个雨季
    2020-12-19 23:47

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

提交回复
热议问题