(James Joyce)
12/25/2002 10:26:00 PM
Okay I figured out the probelem and the solution. It seems to be a bug
in VS/ASP.Net caused by naming the Namespace, Class and .cs file all
the same (PanViewer).
Changing the Namespace to something different (PanViewerLibrary) fixes
the problem. The IDE has no problem with this but ASP.Net seems to
choke.
I_am_James_Joyce@yahoo.com (James Joyce) wrote in message news:<2dec0c71.0212161101.285eaa38@posting.google.com>...
> Help,
>
> I am having trouble creating a Custom Control, I've seen this same
> problem posted three times but never any answer.
>
> I am building a page called WebForm1.aspx to test a custom control
> I am developing called PanViewer (inherits from
> System.Web.UI.WebControls.WebControl). Everything will be working i.e.
> The control compiles, shows up correctly in the IDE for the WebPage,
> and displays properly when I view WebForm1.aspx.
>
> Then at some point (I've started from scratch three times) I add
> some code to the conrol and recompile it and it compiles fine and
> shows up fine in the IDE for the WebPage but when I try to run the
> page I get.
>
> Compiler Error Message: CS0103: The name '__ctrl' does not
> exist in the class
> or namespace 'ASP.WebForm1_aspx'
>
> Once I see this error I can't seem to get rid of it by removing the
> new code or removing the
> references, recompiling then re-adding the control.
>
> Also no code I added at any time uses 'ctrl' or '__ctrl'. I am
> assuming that somehow part of the System.Web.UI.Page is being shadowed
> or something but I am totally stuck.
>
>
> Thanks in advance
>
> Jeremie