Use this function :
function GetClientId(strid)
{
var count=document.getElementsByTagName ('*').length;
var i=0;
var eleName;
for (i=0; i < count; i++ )
{
eleName=document.getElementsByTagName ('*')[i].id;
pos=eleName.indexOf(strid);
if(pos>=0) break;
}
return eleName;
}
Pass
txt_date
as input to it, you will get the clientId for the same. You can keep the Breakpoint on the last line of this function and evaluate eleName.
Sometimes, it becomes very troublesome to find the
client ID
for the server side controls, especially for user controls, data grid elements. In such scenarios you can deploy this function to find the
client ID
for the server control in question. Just the
Server Side Name
of the
control
and you will get the client ID for the same.
Hope this helps.
All the best.