Why method FindControl()
returns null
on FormView
until call DataBind()
.
After that it returns everything correctly?
What workaround are there?
Call DataBind()
before first call of FindControl()
?
Either explicitly call DataBind(), or place your code in the DataBound event of the FormView.