Problems with HtmlInputFile & Page Inheritance

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?
 
G

George Durzi

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

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top