NullReferenceException with IE but not FF?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • clintonG

    NullReferenceException with IE but not FF?

    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.NullRefe renceException when using IE?

    // IE doesn't like this
    Button fb = Page.Master
    .FindControl("C enterPanelConte nt")
    .FindControl("C hannelBuilderWi zard")
    .FindControl("S tepNavigationTe mplateContainer ID")
    .FindControl("F inishButton") as Button;

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

Working...