There are two way you can check the File types using C#.
1. Just Check that Extension of the File in File name if its Jpeg or png you can allow to upload but it quite tricky because some one has changed file extension and upload malicious file.
2. Second you have to check file extension and the file content.so any user change the file extension then it can not allow to upload the malicious file.
you can find that way into the following link.
and i wish you have to choose the second way which is most preferable view.
http://www.dotnetexpertguide.com/2011/05/validate-uploaded-image-content-in.html[
^]