I have a problem explained here:
http://stackoverflow.com/questions/4674737/avoiding-content-type-issues-when-downloading-a-file-via-browser-on-android

I want to download an attachment when CMS.UIControls.UniGridConfig.Action is clicked. This control uses _doPostBack which makes POST requests but some native Android browsers only download attachments via GET method.

I made a workaround which sets a session variable in unigrid_OnAction, reloads the page and builds a response (as GET) with file in Page_Load.

Works like a charm in all desktop browsers, on iPhone browser also on Android Google Chrome but on the
NATIVE ANDROID BROWSER IT DOESN'T. It writes the whole page's HTML source code (without the actual PDF data) into the PDF file and downloads it.

Recent Answers

To make it work on native android browser you will need to set the ContentType to application/octet-stream and put Content-Disposition filename value in double quotes and write the Content-Disposition filename extension in uppercase.