0

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.

2 Answers 2

3

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

Sign up to request clarification or add additional context in comments.

Comments

1

GetTabControl() must be returning a null reference.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.