Assigned ID gets changed! (FindControl not working)

  • Thread starter Thread starter Ivan Demkovitch
  • Start date Start date
I

Ivan Demkovitch

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!
 
SOLVED

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

Changing Page.FindControl to this.FindControl cured problem.
 
Back
Top