Is there a way to use \"<%= someObject.ClientID %>\" in an external javascript file?
If I use the code
<%= someObject.ClientID %>
>
This adds a bit more HTML but it works; wrap each server control in a div...
Set the HiddenField's value in the code behind
hdMyControl.Value = "something";
Then in your external JS file you can get the server control's value
$(document).ready(function () {
var myValue= $('#myContainer input[type=hidden]').val();
I'm not sure that it matters, but I'm adding the script reference to the page via the codebehind using RegisterClientScriptBlock