The following does not work:
var EtxtDOB = $get('<%=FormView1.FindControl("frmEditPerson").FindControl("EtxtDOB").ClientID %>');
How can I find this nested control in javascript?
The following does not work:
var EtxtDOB = $get('<%=FormView1.FindControl("frmEditPerson").FindControl("EtxtDOB").ClientID %>');
How can I find this nested control in javascript?
I find it's a lot clearer code-wise to explicitly emit the IDs of the controls you want to access via Javascript in the page's code-behind. Something like:
Page.RegisterClientScriptBlock("clientIDs", "var myControlID = '" + myControl.ClientID + "';");
Then you can access this anywhere in your client-side script and it's a lot cleaner:
var ExtODB = getElementById(myControlID);
If you want to get fancy create a utility function that does this for you... or create a custom attribute that automatically does this.