Here i have one download option,when i clicks on that button,so many number files are coming which are in DataBase.so,here my requirement is when i clicks on particular file,it should recognize the format that particular file,and displaying like a pop-up with two buttons open and save.
give me some idea to proceed to this kind of situation!
Basically, you need to write the binary data stream from your DB to the output stream of the response object. If you set the correct content-type and content-disposition headers, compliant browsers should give you the familiar Open/ Save/ Cancel dialog.
Something like this:
This doesn't have the headers set but you get the idea...