Problems with HtmlInputFile & Page Inheritance

  • Thread starter Thread starter George Durzi
  • Start date Start date
G

George Durzi

I'm converting a c# web application to support page inheritance so that I
can really change the look and feel of my application by only modifying the
..cs that my pages inherit from.

The only recurring problem I'm having is that none of my HtmlInputFile
controls are working after the conversion.

The page inheritance setup is pure vanilla, copied from some examples on the
web. All the fron end stuff is inside a form tag, etc.. But when any of my
pages try to access an HtmlInputFile control, I get the generic, annoying
error:

Object reference not set to an instance of an object.
at this line
if (txtFileUp.PostedFile.FileName != null && txtFileUp.PostedFile.FileName
!= "")

Any idea?
 
i must be having a bad morning, I forgot to add
enctype="multipart/form-data"
to my form...
 
Back
Top