[1.2] ClientID of dynamic control changes

  1. #1

    [1.2] ClientID of dynamic control changes

    I do not know if this is a symptom of dotNet4 or ext.net but I have found a scenario where a dynamic User Control is added (debug shows client id is 'ctl_cp_ctl14'), but when I it's rendered and break is set in the PageLoad of the user control (debug shows client id for the same object is 'ctl_cp_clt19'). I verified its the same object in both cases. The parent is the same. I only add one user control to limit the chance of some other situation.

    It would be very difficult for me to create sample code for this scenario. I thought I should at least start by asking this question. "Is it possible there is a section of code anywhere within ext.net that rebuilds clientids later in the page life-cycle?" I save some control ids in context.items.
  2. #2
    AutoGenerated id depends from controls creation sequence
    If you have different id then it means that controls are recreated in different sequence (if you have different controls set between requests)
    Set id explicitly for dynamic controls

Similar Threads

  1. Replies: 3
    Last Post: Sep 16, 2011, 7:37 PM
  2. [CLOSED] ListView ClientID differente
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 04, 2011, 10:57 AM
  3. [CLOSED] ClientID inside DirectEvents
    By krzak in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 01, 2011, 10:32 AM
  4. [CLOSED] ClientID of lazy rendered control
    By pschojer in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Nov 17, 2009, 11:44 AM
  5. Grid ClientID Error
    By kumarxlnt in forum 1.x Help
    Replies: 0
    Last Post: Oct 29, 2009, 4:27 AM

Posting Permissions