title: Get filenames from directory where filename like
body: <p>I need to get the filenames of files in a directory where the filename is like a passed in string(Partnumber in my example) and put them in an array.</p>
  
  <p>For example, if my passed in value = 1234_ I want to search the directory and put into the array files such as: 1234.jpg, 1234_1.jpg, 1234_2.jpg and so on.</p>
  
  <p>My first attempt is my code below, which does not work for what I need to accomplish. What do I need to do here?</p>
  
  <pre><code>String Path = Server.MapPath("~/PartImages/" + Partnumber + "_" );
  
  String[] FileNames = Directory.GetFiles(Path);
  </code></pre>