title: Is there a way to specify a max height or width for an image?
body: <p>I'd like to have an image to have either a height of 725 or a width of 500 and maintain it's aspect ratio.  When I have images with a height of over 725 and thinner than 500 they get stretched out to fit a width of 500.</p>
  
  <p>What is the best way to do this?</p>
  
  <p>Below is what I am doing now:</p>
  
  <pre><code>&lt;asp:Image Height="725" width="500" ID="img_DocPreview" /&gt;
  </code></pre>
  
  <p><strong>Update:</strong>
  Changed it to this but have the same problem.  If I specify just the height it will maintain the aspect ratio but it exceeds the max width of 500px that i want.</p>
  
  <pre><code>&lt;img style="height:725px;width:500px;" id="img_DocPreview" src="Images/empty.jpg" /&gt;
  </code></pre>