Add Command removes it from first control collection befor adding to the
second one, but even if I do it myself it doesn't work. (The control is
removed - id doesn't appear on the page twice, but it receives all events
two times)
"John Saunders" <> wrote in message
news:...
> "Slawek" <> wrote in message
> news:...
> > Hi everyone,
> > I have a problem that I can't resolve. I have created a user control
which
> > is included in asp.net page (<@register...etc). All I need is to move
this
> > control from one place on the page to another(in Page_Load method). For
> > example my control belongs to one cell (<td>) tag and I have to move it
to
> > another cell(<td>). In c# code I use <new tag>.Controls.Add(mycontrol)
and
> > it works perfect, accept that after moving control, all events for my
> > control are fired twice(for example Load in my control and even pressing
> > button in it). It looks like after adding control to new tag there is
two
> > instances of my control on the page. Because of this my application
works
> > improperly. I don't know how to fix it. Any suggestions ??
>
> How about if you remove the control from the first cell before adding it
to
> the second cell?
> --
> John Saunders
> Internet Engineer
>
>
>