Saturday, March 28, 2009

ClientID vs. UniqueID

  • UniqueID is the fully qualified control name which is used by Asp.net for postbacks. You hardly need to use it.
  • ClientID is the value that will appear in the id attribute of the control, it is a translation of the UniqueID to be a html compliant id tag (leading underscores are not really html compliant). So you need to use document.getElementById with ClientID.

References:

UniqueID vs ClientID

The difference between ID, ClientID and UniqueID

blog comments powered by Disqus