If you have used ASP.NET web controls and java script you must have faced the problem of getting control’s id in java script especially if you are using content place holders, repeaters etc. So when generating the html content ASP.NET generates a unique Id to uniquely identify the control on the webpage. This id is visible through the property control.ClientId. And use this clientId in your java script to reference the control. I came across this recently when I was reviewing a code, I found that the developer getting the source code (html) for the aspx from the browser and hard coding that in the java script. Good logic (it was inside a content place holder), but there is no guarantee that the id is going to be same. For example the id generated in IIS5.0 and IIS 6.0 may be different. So if you develop in IIS 5.0 and deploy in IIS 6.0 (which most of us do) you will be shown the weird javascript error ‘value is null’ J.
You will need to render the java script through code behind. See msdn documentation for how to use client scripting in ASP.NET pages.
Check here for documentation on control.ClientId
Rujith