How to access the ClientID from a ServerControl in an external JavaScript
问题 At the moment, if I use JavaScript in my SharePoint projects, I add the code into the *.ascx file, in a <script type="text/javascript"></script> block and create for each element a variable for the ClientID . For example: var test = '<%= TextBox1.ClientID %>'; Now I would like to add an external JavaScript to my projects and insert the code there. But how could I access to the ClientID ? In the external JavaScript I can’t use <%= TextBox1.ClientID %> . I found this: referencing server