473,396 Members | 2,057 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,396 software developers and data experts.

declared or not declared ?

I'm usinf asp 2.0 and visual studio 2005

In html
<img id="selcolorimg" runat="server" name="selcolorimg"
src="image4.jpg">

I want to use selcolorimg in code behind, but vs2005 throws an error
"selcolorimg is not declared"

Ok, i tried to insert

Protected selcolorimg As HtmlImage

BUT, NOW i get a new error
'selcolorimg' is already declared as 'Protected Dim WithEvents
selcolorimg As System.Web.UI.HtmlControls.HtmlImage' in this class.

Declared where?? So, why vs2005 says is not declared??

Feb 5 '06 #1
3 4455
Well it's clear that it is declared otherwise you would not get this error.
The question is why intellisense is not recognising the fact when you are
trying to use the variable. Try saving all. Recompiling the entire project,
and restarting 2005 and see if it appears in intellisense.

--
Terry Burns
http://TrainingOn.net

"JohnZing" <jo*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm usinf asp 2.0 and visual studio 2005

In html
<img id="selcolorimg" runat="server" name="selcolorimg"
src="image4.jpg">

I want to use selcolorimg in code behind, but vs2005 throws an error
"selcolorimg is not declared"

Ok, i tried to insert

Protected selcolorimg As HtmlImage

BUT, NOW i get a new error
'selcolorimg' is already declared as 'Protected Dim WithEvents
selcolorimg As System.Web.UI.HtmlControls.HtmlImage' in this class.

Declared where?? So, why vs2005 says is not declared??

Feb 5 '06 #2
Thank you Terry!
I had to restart vs2005. Now it works! Lost 2 hours searching and
trying to figure out whats wrong with my code :( I feel so stupid... oh
well..

Feb 5 '06 #3
There is a bug in VS, where it keeps trying to declare items which don't need to be declared

The solution is to save work and close VS, then reopen VS, big pain in rear.
"JohnZing" <jo*******@gmail.com> wrote in message news:11**********************@g14g2000cwa.googlegr oups.com...
I'm usinf asp 2.0 and visual studio 2005

In html
<img id="selcolorimg" runat="server" name="selcolorimg"
src="image4.jpg">

I want to use selcolorimg in code behind, but vs2005 throws an error
"selcolorimg is not declared"

Ok, i tried to insert

Protected selcolorimg As HtmlImage

BUT, NOW i get a new error
'selcolorimg' is already declared as 'Protected Dim WithEvents
selcolorimg As System.Web.UI.HtmlControls.HtmlImage' in this class.

Declared where?? So, why vs2005 says is not declared??

Feb 5 '06 #4

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

Similar topics

0
by: ReignMan | last post by:
I'm running JDK 1.4.0_01, Xalan2.5.1 and Tomcat 4.1.27. XSL transformations work, yet when running in debug mode (Eclipse IDE), I get the following: 990S2html.xsl:3:80: Element type...
5
by: William | last post by:
In Peer.h, I have: class Peer { // ... }; In Overseer.h, I have: #include "Peer.h" #include <vector>
6
by: lovecreatesbeauty | last post by:
Hello Experts, Why static data members can be declared as the type of class which it belongs to? Inside a class, non-static data members such as pointers and references can be declared as...
7
by: bisforbenson | last post by:
I'm trying to compile things with gcc 4. After running the following command: % gcc -O3 -g -Wall -Wno-unused -DLINUX -D_REENTRANT -o ../../obj/egi.o -I../../include/ -I... -c egi.cpp i get...
1
by: Derek | last post by:
I am writing a web application for job seekers, and am adding a section that allows administrators to upload jobs to the system via xml. I have used an xml schema to validate the xml they upload....
1
by: Bimal | last post by:
Hi, I upgraded my gcc from 2.95 to 3.3. When I compile some projects I get error messages saying... /usr/local/include/c++/3.3/ctime:68: error: `tm' not declared...
4
by: newbie120 | last post by:
Hi all maybe its just been a long day, but i have a question about call access modifiers in C#. Consider the following code. namespace Application { private class Class1 { int i;
14
by: Darren L. Weber | last post by:
I am trying to compile a utility to create .avi files. See http://cpbotha.net/im2avi I'm working on Debian etch (a mix of testing/unstable). dweber@dnlweber:~/im2avi-0.4$ g++ --version g++...
6
by: silversurfer2025 | last post by:
Hello world, I seem to go from one tricky error to the other (at least tricky for me). I am using qt and another code-package where many other files are stored which I need (written by someone...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.