The fact that you have no control over the generated HTML makes it difficult.
If you haven't come across jQuery and some small DOM overhead, this will work:
Grab the container by all objects, let them say them in a div. Keep this selector as tight as possible, as it is "loosened", the more elements are processed and, therefore, the more overhead.
var pattern = '_ctl00_txtValue'; $('#somecontainer input').each(function() { if ($(this).attr("id").indexOf(pattern) > 0) {
Basically, you iterate over the DOM elements in a specific container, checking if the identifier contains the template you want, and then applying your CSS.
This should work, but as I said, the DOM overhead is related to how your HTML code is structured.
source share