473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Name 'ImageUpLoad' is not declared

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.
************************************************** *********************
Mar 21 '06 #1
2 1157
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
"Neo Geshel" <go****@geshel.org> wrote in message
news:en*************@TK2MSFTNGP11.phx.gbl...
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.
************************************************** *********************
Mar 21 '06 #2
Winista wrote:
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.
************************************************** *********************
Mar 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Pete Mahoney | last post by:
I am currently working on an ASP page where I create a lot of different check boxes. I have some checkboxes that are Windows platforms and some that are solaris platforms. I want a control...
4
by: Dan Jacobson | last post by:
Using <A name="x_y-z"></A>, I even get nervous about the _ and -. w3-recs/RECS/html4/struct/links.html seems to say all of ascii is cool and beyond. Anyway, just what is the safe range for...
8
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
20
by: Jim Ford | last post by:
I understand that some compilers define a symbol that can be used anywhere in the code in order to find out, at run time, the name of the file where the code corresponding to the current execution...
3
by: Mark Oliver | last post by:
Hi, Is there any way to get the declaration name of a parameter either through reflection, StackFrame, or something else? Thanks, Mark
13
by: Don | last post by:
How do I get an Enum's type using only the Enum name? e.g. Dim enumType as System.Type Dim enumName as String = "MyEnum" enumType = ???(enumName)
2
by: Neo Geshel | last post by:
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...
1
by: Bama | last post by:
I have an employee database. Recently I need to add a new field for the photo of each of the employee. I already have a form to enter new data for the staff, and I am creating pop up window to...
4
by: andrew | last post by:
Hi, I have routinely added anchors to pages using both name and id: <a name="example" id="example"></a> under the possibly mistaken assumption that at some stage "name" might be deprecated...
0
by: padmagvs | last post by:
I have a wsdl something like this <?xml version="1.0" ?> <definitions targetNamespace="http://abc.com/namespace/wsif/samples/abc" xmlns:tns="http://abc.com/namespace/wsif/samples/abc"...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.