Uploading a file in the server is very easy. Just you will find in the files collection of every request object when you have placed one Input type=file control in the page.
In Web browser there is no option to specify the mime type unless you use some external application (flash/silverlight) to choose file. Thus you cannot have filter option for "jpg and gif" only while choosing the file. Rather you can check the mime type in the server to determine the actual file types.
You might use <asp:FileUpload to do this very easily.
<asp:FileUpload runat="server" ID="fupload"/>
Now in the server side :
if(fupload.PostedFile.ContentType.equals("image/jpeg") || fupload.PostedFile.ContentType.equals("image/gif") )
fupload.SaveAs(new Guid().ToString() + ".gif");
Thus by this way you can save the image in the server.
Change the logic around this code to suit your needs.
Cheers. Itsmaninderkaur, if this helps please login to Mark As Answer. | Alert Moderator