Question

Why do I get "Object Reference Not Set to Instance of an Object"

protected void GetData()
{
    ...

    id = this.GetTabControl().ID; //<---------here
}

...

protected ASPxPageControl GetTabControl()
{
    return (ASPxPageControl)this.FindControl("DetailTab");
}

---------I assume the FindControl is not working.

Was it helpful?

Solution

Presumably because GetTabControl() is returning null. We can't tell why without more code though.

OTHER TIPS

GetTabControl() must be returning a null reference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top