I want to fill dropdownlist which is inside FormView. I'm writing this code at PageLoad event:
DropDownList ddlTypeOfPayment = dvBooking.FindControl("ddlTypeOfPayment") as DropDownList;
But when I compile itraises the error "Object reference is not set to an instance of object". I'm using objectdatasource to bind formview. How can I do this?