Groups | Blog | Home
all groups > asp.net webcontrols > october 2003 >

asp.net webcontrols : Assigned ID gets changed! (FindControl not working)


Ivan Demkovitch
10/7/2003 3:11:22 PM
Hi!

I have following problem:

When I create control dynamically and assign ID to it it get's changed if
you look at output HTML.

Because I add this control inside ascx it is prefixed with something like
"ctl0_". Therefore FindControl is not working...

How to deal with this?

Thanks!


Ivan Demkovitch
10/7/2003 3:16:18 PM
SOLVED

Since I had code in ASCX ID was prepended with additional ID for ASCX
itself.

Changing Page.FindControl to this.FindControl cured problem.


[quoted text, click to view]

AddThis Social Bookmark Button