By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,207 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,207 IT Pros & Developers. It's quick & easy.

Problems with HtmlInputFile & Page Inheritance

P: n/a
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?
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


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

"George Durzi" <gdurzi@nospam_hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP09.phx.gbl...
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?

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.