NullReferenceException with IE but not FF?

C

clintonG

This is the first time I've seen the compiler complain with IE [1] but not
Firefox. So how do I write code that apparently finds a control and is used
logically with one browser (Firefox) but then fails with
System.NullReferenceException when using IE?

// IE doesn't like this
Button fb = Page.Master
.FindControl("CenterPanelContent")
.FindControl("ChannelBuilderWizard")
.FindControl("StepNavigationTemplateContainerID")
.FindControl("FinishButton") as Button;

[1] Object reference not set to an instance of an object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,490
Latest member
Finplus

Latest Threads

Top