title: How do I specify the canvas' ClientIDMode property?
body: <p>I am using a DevExpress Component (ASPxImageSlider) with a canvas tag inside of one of the slides like this one below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var video = $("#video")[0];               // video element itself is at index 0 
  var vw;
  var vh;
  
  var canvas = $('#canvas')[0];             // canvas element itself is at index 0
  var context = canvas.getContext("2d");    // getContext on canvas element itself
  
  // setup canvas when metadata is available
  video.addEventListener("loadedmetadata", function () {
      vw = this.videoWidth || this.width;   // these are on video element itself
      vh = this.videoHeight || this.height;
      canvas.width = vw
      canvas.height = vh;
  }, false);
  
  // call it straight, use global (or parent) variables
  video.addEventListener("play", draw, false);
  
  function draw() {
      if (video.paused || video.ended) {
          return;
      }
  
      context.drawImage(video, 0, 0);
  
      requestAnimationFrame(draw);  // loop anim. using rAF
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;canvas id="canvas" style="border: 2px solid blue; width: 100%; height:100%;"&gt;
          &lt;video id="video" autoplay="autoplay" loop="loop" class="video" preload="metadata" poster=""&gt;
              &lt;source src="images/video.mp4" type="video/mp4" /&gt;
          &lt;/video&gt;
      &lt;/canvas&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Now, on its own the canvas tag displays the video as expected however once I put it into the slider, it gives me errors like: "JavaScript runtime error: Unable to get property 'getContext' of undefined or null reference". I reported this to their support team and they state that since canvas is located inside several naming containers it has a complex ID. Their suggested solution was to specify the canvas' ClientIDMode property and obtain the current control via the standard JavaScript getElementById() method. Does anyone have any clue how I would go about doing this (seeing as its not their components that are the problem)? Any suggestions would be great.</p>