Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Assigned ID gets changed! (FindControl not working)

Reply
Thread Tools

Assigned ID gets changed! (FindControl not working)

 
 
Ivan Demkovitch
Guest
Posts: n/a
 
      10-07-2003
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!



 
Reply With Quote
 
 
 
 
Ivan Demkovitch
Guest
Posts: n/a
 
      10-07-2003
SOLVED

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

Changing Page.FindControl to this.FindControl cured problem.


"Ivan Demkovitch" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Firefox null gets assigned before XHR returns. Works in IE. pbd22 Javascript 9 10-14-2009 02:10 PM
XMLHttpRequest gets data to display in element but data gets appended not replaces previous! libsfan01 Javascript 5 12-20-2006 06:25 AM
Not only the selected HREF gets surrounded, but the whole row gets surrounded Stefan Mueller HTML 5 07-10-2006 11:53 AM
Assigned ID gets changed! (FindControl not working) Ivan Demkovitch ASP .Net 1 10-07-2003 08:16 PM
Change/intercept URL that gets assigned to a bookmark? Robert Oschler Javascript 0 07-10-2003 02:51 AM



Advertisments