Name 'ImageUpLoad' is not declared

N

Neo Geshel

Greetings.

I have a file upload form. I have a file upload input, with its ID set
as ImageUpLoad. When I try to submit the form, I get

Name 'ImageUpLoad' is not declared

This is the line causing the problem:

Dim imgStream As Stream = ImageUpLoad.PostedFile.InputStream

In every example on the 'net, this was the accepted usage. Why is it not
working for me? It seems that the script is unable to realize that there
is a form field with that name, and yet I have cut-and-pasted from many
"working" online examples.

BTW, all of my code is in the code-behind. The only content on my main
page is the @page directive. Everything is built dynamically from the
code, as I intend to compile it later.

TIA
...Geshel
--
***********************************************************************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
***********************************************************************
* “I contend that we are both atheists. I just believe in one fewer *
* god than you do. When you understand why you dismiss all the other *
* possible gods, you will understand why I dismiss yours.†*
* - Stephen F. Roberts *
***********************************************************************
* “Anyone who believes in Intelligent Design (“creationismâ€) is just *
* as ignorant, irrational and ill-educated as someone who believes *
* that the world is a flat disc, that the Sun circles the Earth or *
* that there really is a tooth fairy. Darwinism has an overwhelming *
* foundation of evidence that can be tested and reproduced. *
* *
* “Intelligent Design, on the other hand, has no evidence at all;not *
* one single shred of testable proof. As such, Intelligent Design is *
* Religious Mythology, and has no right whatsoever to be in our *
* Science classrooms.†- 99.99+% of Scientists *
***********************************************************************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.†Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
***********************************************************************
 
W

Winista

If you are using .Net1.1 then you will have to add declaration of this
control's definition in your codebehind file.

--
Netomatix
http://www.netomatix.com
Greetings.

I have a file upload form. I have a file upload input, with its ID set
as ImageUpLoad. When I try to submit the form, I get

Name 'ImageUpLoad' is not declared

This is the line causing the problem:

Dim imgStream As Stream = ImageUpLoad.PostedFile.InputStream

In every example on the 'net, this was the accepted usage. Why is it not
working for me? It seems that the script is unable to realize that there
is a form field with that name, and yet I have cut-and-pasted from many
"working" online examples.

BTW, all of my code is in the code-behind. The only content on my main
page is the @page directive. Everything is built dynamically from the
code, as I intend to compile it later.

TIA
....Geshel
--
***********************************************************************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
***********************************************************************
* "I contend that we are both atheists. I just believe in one fewer *
* god than you do. When you understand why you dismiss all the other *
* possible gods, you will understand why I dismiss yours." *
* - Stephen F. Roberts *
***********************************************************************
* "Anyone who believes in Intelligent Design ("creationism") is just *
* as ignorant, irrational and ill-educated as someone who believes *
* that the world is a flat disc, that the Sun circles the Earth or *
* that there really is a tooth fairy. Darwinism has an overwhelming *
* foundation of evidence that can be tested and reproduced. *
* *
* "Intelligent Design, on the other hand, has no evidence at all; not *
* one single shred of testable proof. As such, Intelligent Design is *
* Religious Mythology, and has no right whatsoever to be in our *
* Science classrooms." - 99.99+% of Scientists *
***********************************************************************
Mignon McLaughlin once said that "A nymphomaniac is a woman [who is] as
obsessed with sex as the average man." Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
***********************************************************************
 
N

Neo Geshel

Winista said:
If you are using .Net1.1 then you will have to add declaration of this
control's definition in your codebehind file.

I don't understand. I thought you only had to do this if you had the
control hard-coded in the ASPX file. I am dynamically creating *ALL* of
the HTML controls in the codebehind file. In fact, I am creating
*everything* there because I intend to compile the codebehind file.

TIA
...Geshel
--
***********************************************************************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
***********************************************************************
* “I contend that we are both atheists. I just believe in one fewer *
* god than you do. When you understand why you dismiss all the other *
* possible gods, you will understand why I dismiss yours.†*
* - Stephen F. Roberts *
***********************************************************************
* “Anyone who believes in Intelligent Design (“creationismâ€) is just *
* as ignorant, irrational and ill-educated as someone who believes *
* that the world is a flat disc, that the Sun circles the Earth or *
* that there really is a tooth fairy. Darwinism has an overwhelming *
* foundation of evidence that can be tested and reproduced. *
* *
* “Intelligent Design, on the other hand, has no evidence at all;not *
* one single shred of testable proof. As such, Intelligent Design is *
* Religious Mythology, and has no right whatsoever to be in our *
* Science classrooms.†- 99.99+% of Scientists *
***********************************************************************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.†Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
***********************************************************************
 

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,780
Messages
2,569,611
Members
45,285
Latest member
CryptoTaxxSoftware

Latest Threads

Top