You also need to take care of the element mode in which your control exists that you want to find. For example, if your control is in an Element Template, then it will look like.
if (FormView1.CurrentMode == FormViewMode.ReadOnly) { Panel pnl = (Panel)FormView1.FindControl("pnl"); }
source share