Skip to content

Ninject causes FindControl to return null in Page_Load in ASP.NET weform #99

@bizzehdee

Description

@bizzehdee

We have a large ASP.NET web forms project which we recently added ninject too, after adding ninject to the project references and started to use it within the project, we noticed a lot of unrelated pages began to throw null reference exceptions on Page_Load and narrowed it down to FindControl being called, although the controls where in the markup with the correct ID and runat="server" set.

We have then removed ninject, and the problem goes away.

Does ninject alter the way in which events are fired or the way in which Page_Load is ran? Or does ninject overload FindControl?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions