title: how to make sure of the uploaded file type in c#
body: <p>I want to let users upload images and videos to my website. Normally I check the image extension for <code>jpg</code> or <code>png</code> extension. But I tested the security of my web by upload a shell to hack it, so I changed the shell's extension to <code>.jpg</code>. </p>
  
  <p>Sadly it had been uploaded to the host's folder normally and shows all my files, so if any one know the best way to make sure this file is a video or this file is a real image before uploading it to the host in <code>C#</code> <code>Asp.net</code> web forms.</p>