well I can't understand that since I choose the ID and so it would be my
mistake?! How the heck can I find the control with Page.Findcontrol() if
.Net suffixes my ID with some random name??
>> I have this simple user control having a Datalist with
>> id="MyDataList" in my page but I can't find it using the
[quoted text clipped - 7 lines]
> Very simple: otherwise you would get a duplicate ID
> (MyDataList) when you add your control to the page twice.
Ben Strackany - 27 Dec 2004 23:04 GMT
Yeah, you won't be able to find a control within another control.
Assuming you put a user control with an ID of MyUserControl in the page, you
might be able to have your page's code use
MyUserControl.FindControl("MyDataList").

Signature
Ben Strackany
www.developmentnow.com
> well I can't understand that since I choose the ID and so it would be my
> mistake?! How the heck can I find the control with Page.Findcontrol() if
[quoted text clipped - 11 lines]
> > Very simple: otherwise you would get a duplicate ID
> > (MyDataList) when you add your control to the page twice.