473,657 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

save attachment in mobile

3 New Member
for mobile browser i used the following code :

Response.Conten tType = "applicatio n/vnd.wap.xhtml+x ml";
Response.Append Header("Content-Disposition","a ttachment; filename=SailBi g.jpg");
Response.Transm itFile( 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
1 1723
santosh singh
3 New Member
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.Conten tType = "applicatio n/vnd.wap.xhtml+x ml" is correct MIME type of my mobile browser
Response.Conten tType = "applicatio n/vnd.wap.xhtml+x ml";
Response.Append Header("Content-Disposition","a ttachment; filename=SailBi g.jpg");
Response.Transm itFile( 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

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

Similar topics

4
16344
by: Dariusz | last post by:
I have the following code which executes successfully to call the browsers "save as" box... //Screensavers if ($FileType == 'scr') { // We'll be outputting a screensaver header('Content-type: application/octet-stream'); // It will be called test.scr header('Content-Disposition: attachment; filename="test.scr"');
2
4473
by: Chris Lobdell | last post by:
Hey, everyone. For the past two years, we have offered files for download through a secure website. Users, after clicking on a link, are redirected to a PHP page that passes the appropriate header information to the user and inquires if that user wishes to download the file. A sample of that code is below: header('Content-Type: application/save'); header('Content-Disposition:attachment; filename="'.$file_path .'"');
2
4304
by: Steve | last post by:
How do you programatically save files that are attached to an email to a specified folder? It could be one file or multiple files attached to the email. Can it be done if Outlook Express is being used or does Outlook have to be used? Thanks for all help! Steve
5
6872
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting downloaded before the Save As dialogue appears. As we will be downloading some large files, it's unpractical to have this. So far the code I have to download the file is
8
2684
by: DanB | last post by:
This is probably soooo simple but I can't seem to get it. I have a text file that I want users to download via a web page. I want the file to be saved to a default folder (or one that they choose) on the users / client file system. I have toyed with a Self-Extracting zip file but the contents of my zip file changes each time it is downloaded so that invalidates the exe file. Also the text file is so small it is a waste to zip it.
4
6255
by: Jonny | last post by:
Hello Group How do I open a Save File Dialog from an ASPX page behind a browse button? Any help would be fantastic!! I am using ASP.NET 1.1 using VB.NET as the coding language TIA
3
6431
by: =?Utf-8?B?YXNkZg==?= | last post by:
Hello. I am making a web application with c# and am using this code: Response.ContentType = "application/x-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("あいうえお") + ".csv"); Encoding encoding = Encoding.GetEncoding("Shift-JIS"); Response.BinaryWrite(encoding.GetBytes(csvStr)); Response.End(); It works fine..the data gets saved nicely to an excel file. The user pushes the...
4
9651
by: sonja.chevre | last post by:
Hello ! I'm looking for a script which allows me to read emails and attachment from a pop server (then I'll save the email's text in a db and the attachments on the server). So I have found this article: http://www.phpit.net/article/read-email-php-pop3/ .... $email = $pop3->get_mail($i); // how to get the email
1
3226
by: E11esar | last post by:
Hi there. I am developing a mobile device application which has an OpenFileDialog control which copies an image into a PictureBox, code as follows: try { OpenFileDialog open = new OpenFileDialog();
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.