ASP really loves to manipulate identifiers. The further down the rabbit hole (or nesting controls) you go, the more ASP adds your control identifier. Drop the master pages, and this is another level or two.
Another way to access server-side controls (with a set of runat properties) is to use square brackets in the jQuery selector.
Like this:
$("[id$='hidImgSource']").val()
This selects any elements whose identifier has "hidImgSource" as the trailing part of the name. That way, it will find malformed identifiers.
Here is a link to the jQuery Selectors page that explains some additional options.
source share