Hello,

I have created a Mobile Application in C# .net.
I am sending a W*****h SMS for users who may request Mobile Services such as (Ringtones, Pictures).
I have a problem in downloading ringtone(True Tone of file extension AMR) on WAP Browser, the ringtone name is not saved. After downloading the Ringtone file
takes the link file name "userlink" which appears in url(ex, url: http://IP/webapplication?userlink.asp?pwd=887768).The file name (amr) is not known on WAP Browser, so I am sending the link to users to download it through Binary method.
The idea is I can download file type AMR (or in MP3...) from my Web Browser but it is not saved on mobile handset in its real name just it can be heard. Also I am giving the file name through this syntax: Response.AppendHeader("Content-Disposition",

"attachment;filename="+ szFileName.Trim());
The code is Below:
Please help to fix my problem as soon as possible ...........

//*********************************************

private void Download(int szID)
{

string szContent="";
string szType="";
string szFileName="";
SqlConnection Conn = new SqlConnection(GetConnect());
string sqlselect="SELECT ContentUrl,Type,ContentName FROM ContentType where ID='"+szID+"' ";
Conn.Open();
SqlCommand CmdObj = new SqlCommand(sqlselect, Conn);

SqlDataReader ReaderObj = CmdObj.ExecuteReader();

if(ReaderObj.Read())
{
Response.Expires = 0;
Response.Buffer=true;
Response.Clear();

szContent=ReaderObj.GetString(0);
szType=ReaderObj.GetString(1);
szFileName=ReaderObj.GetString(2);
Response.ContentType=szType ;
Response.AppendHeader("Connection","keep-alive");
Response.AppendHeader("Content-Disposition",

"attachment;filename="+ szFileName.Trim());

Response.AddHeader("pragma","no-cache");

if(!ReaderObj.IsDBNull(2))
{

System.IO.FileStream fs = new System.IO.FileStream

("C:\\Inetpub\\wwwroot\\MobileApplication\\"+szContent,System.IO.FileMode.Open,FileAccess.Read );
System.IO.BinaryReader br = new System.IO.BinaryReader(fs);
byte[] byteArray = new byte[fs.Length];
br.Read (byteArray,0,(int)fs.Length);
Response.BinaryWrite(byteArray);
Response.Flush();
ReaderObj.Close();
}
else
{
Response.Write("no image exists!!");
}
}

}


//*******************************************//



Sincerely,
Ranine