Is there a way to search for a jpg or PDF if you just have the name of the file?
Dummy site: www.dummysite1.com/animal=dog
What I want to do is parse the URL, take the parsed name "dog" and search through a folder for a .jpg of the same name.
So lets say I have a folder named "imgAnimal" after I parse "dog" I want to look in "imgAnimal" folder for "dog.jpg". I then want to open "dog.jpg" in another window.
I don't know if this is the best way to even do this or if its even possible, but just thinking of a way and not being familiar with C# it's what I came up with. The folder will have a lot of images in it so I don't know if searching through them all would be the best thing or if it would matter.
Any ideas are welcomed I don't HAVE to do it this way if there is a better way. Thanks.
Edit:
I have the parsed code and everything having to do with pulling the URL part written. The only thing I'm really asking is - Is there a way in C# to take a word like "dog" and use it in a search to find "dog.jpg" then open that jpg in a new web window?