title: vb.net CDN Images Only on Production
body: <p>Whats the right way to change the url for all the images on my site to use a cdn url or not based on a web.config value.</p>
  
  <p>I have this web.config value</p>
  
  <pre><code>&lt;add key="UseCDN" value="1"/&gt;
  </code></pre>
  
  <p>now my page has a whole bunch of &lt;\asp:image imageurl="RELATIVEPATH" tags.</p>
  
  <p>I want them to point to my machine when "useCDN" = 0 and to cdn.com\RELATIVEPATH when "useCDN" = 1</p>
  
  <p>whats the best way to do this?</p>