Using ClientID Get Property Sets ID value for ASP.net controls

So my discovery today is an example of silly programming errors that I tend to supprise me.
Some of my controls in ASP.net don’t have assigned ID’s. However using the code below you should see an example of one control returning the first IsNothing line without a value, but once ClientID is used it will populate the control’s ID so it will be found the second time. I recommend just using ClientID for logic, if the ID is not populated it will autogenerate it for you to be handled on your code proceeding after.

Leave a comment

Your email address will not be published. Required fields are marked *