By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,312 Members | 1,900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,312 IT Pros & Developers. It's quick & easy.

save attachment in mobile

P: 3
for mobile browser i used the following code :

Response.ContentType = "application/vnd.wap.xhtml+xml";
Response.AppendHeader("Content-Disposition","attachment; filename=SailBig.jpg");
Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") );

but this code is not able to open "Save as dialog box " on mobile Emulator Browser .Could anyone please tell me How to open "Save as dialog box " in mobile . i am using XHTML ( not WAP ) with ASP.NET & C# .
Feb 7 '08 #1
Share this Question
Share on Google+
1 Reply


P: 3
Task :
A web mail application that runs on mobiles.

User should get an option to save the attachments (similar to one gets in Web and Windows apps).

This needs to be done in xhtml (not WML) with ASP.NET & C#



Approach:



1. To get the precedence, tried to open the attachments as follows :

Initially i tried to download attachments in Yahoo mails on Motorolla (Black Razr V3), iMate ( SP3 ) and Samsung (E830 SlimSider 2.0 mega). But the attachments can be viewed but cannot be downloaded on these devices



2. Tried on various ways but this seemed most promising:



//Response.ContentType = "application/vnd.wap.xhtml+xml" is correct MIME type of my mobile browser
Response.ContentType = "application/vnd.wap.xhtml+xml";
Response.AppendHeader("Content-Disposition","attachment; filename=SailBig.jpg");
Response.TransmitFile( Server.MapPath("~/images/sailbig.jpg") );

This code works perfect for IE browser (opens " Save As Dialog Box" and then Saves); But when tested on mobile Emulator (YOSPACE) ,it gives me blank screen after clicking on Attachment .



So, this code is not able to open "Save as dialog box " on mobile Emulator Browser.



I am exploring further. If you have any indicators on this, please let me know.
Feb 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.