Even more odd (?), I gave them different names:
Page A: BookControl1 book selector file: X.xml
Page B: BookControl2 book selector file: Y.xml
And now, not only does the problem still persists, now every now and then
the control disappears completely from the rendered page... That never
happened b4, and the DLL containing the control (or the code of the control)
have not even changed.
I am really puzzled by this behaviour.
[quoted text, click to view] "~~~ .NET Ed ~~~" <tiredofspam@abolishspam.now> wrote in message
news:OI8aKqk0EHA.1404@TK2MSFTNGP11.phx.gbl...
>I am currently using the ScottWatter (or ScottWater) Amazon Book Control in
>a website I am developing. Basically this is the outline:
>
> - It is a custom web control with designer support
> - Does not depend on any other library with the exception of a few
> Framework (System.Data,.XML,.Designer) libraries.
> - You control it by telling it (via a property) the path to the XML
> configuration file.
> - The control registers its XML configuration file as a response file
> dependency
> - The control has ViewState disabled because it does not need to remember
> any information during PostBacks
>
> It uses the configuration file to select a random book from the list and
> display it. Pretty simple really. So what is the problem?
>
> An odd one but I may be missing something. This BookControl is used in two
> different pages of the website. Each
> instance is on a *different* page, Each instance was assigned the
> "BookControl1" ID by vs.net. Each control is given a *different*
> configuration file, i.e BookControl1 on page A is about Technical books,
> and BookControl1 on page B is about Fiction.
>
> The problem here is that even though the controls are on *different*
> pages, some times the control on Page B starts selecting books from the
> control on Page A and viceversa!!!! this is very strange because they are
> on different pages (have I stressed that enough?) and have no idea about
> the other control's configuration file.
>
> Is it possible that the web control IDs (BookControl1 in this case) need
> to be UNIQUE across a site and not just a page?, meaning I cannot have two
> controls named BookControl1 in the same ASP.NET application as a whole?.
> This means that if you have it 20 times on 20 different pages you have to
> keep track of that yourself because Visual Studio will always assign it a
> name BookControl1 every time it is the "first" control of that kind on a
> page.
>
> Any feedback on this is welcome, I find it odd but I could be missing some
> ASP.NET small letters some place ;)
>
> Thanks in advance
> Em.
>