UniqueID, ClientID
-
Hi, I'm working on a weblog control @ http://www.coders-lab.net/index.aspx?sm=myweblog[^] It works with a template, and in order to retrieve values on postback, I use the client id of the control. In case of an ASP:TextBox, this is UniqueID; but in case of the FreeTextBoxControl for example, it's ClientID. What is the difference between UniqueID and ClientID? Why do I have to use UniqueID of ASP:TextBox to get the client id, and ClientID to get the client id of the FreeTextBoxControl...?
-
Hi, I'm working on a weblog control @ http://www.coders-lab.net/index.aspx?sm=myweblog[^] It works with a template, and in order to retrieve values on postback, I use the client id of the control. In case of an ASP:TextBox, this is UniqueID; but in case of the FreeTextBoxControl for example, it's ClientID. What is the difference between UniqueID and ClientID? Why do I have to use UniqueID of ASP:TextBox to get the client id, and ClientID to get the client id of the FreeTextBoxControl...?
It's about how and when the page is rendered during the pages events, and when which id is made available, server then client. UniqueID — The hierarchically-qualified unique identifier assigned to a control by the ASP.NET page framework. ClientID — A unique identifier assigned to a control by the ASP.NET page framework and rendered as the HTML ID attribute on the client.