title: Checking if image exist in my local resources
body: <p>net/C# application I have list of items.</p>
  
  <p>In the code behind: 
  I want to assign a picture from my local resources for each item. the items name and the picture names are the same.
  The pictures are all in a "image" folder in my project.</p>
  
  <p>Example of how I assign a picture to an item:</p>
  
  <pre><code>Item1.PictureUrl = "images/items/" + item1.Name + ".jpg";
  </code></pre>
  
  <p>I have items that don't have pictures. I want to assign for them a default picture.</p>
  
  <p>I tried to check if the picture exists using this:</p>
  
  <pre><code>foreach(ObjectItem item in ListOfItems)
  {
      if(File.Exists("images/items/"+item.Name+".jpg"))
              item.PictureUrl = "images/items/"+item.Name+".jpg";
          else
              item.PictureUrl= "images/Default.jpp";
  }
  </code></pre>
  
  <p>But the File.Exists method is always returning false, even if the picture exist.
  I also tried to use '\' instead of '/' but didn't work</p>
  
  <p>How can I do it?</p>
  
  <p>Thank you for any help</p>