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" <> wrote in message
news: 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??
>