Mobile File Upload Control Problem in IE7 and Mozilla Browsers RRS feed

  • Question

  • User-45530239 posted

    Hello All..... 

    r i am using this concept for my development can u help me my mobile .aspx and code behind is below

    i am using ASP File Upload control to upload the file. 

    .ASPX page:

    <mobile:Form ID="Form1" Runat="server">

    <mobile:DeviceSpecific ID="device1" Runat="server">

    <Choice Xmlns="http://schemas.microsoft.com/intellisense/ie3-2nav3-0" >


    <asp:FileUpload ID="ftxt" runat="server" ToolTip="Jay" />




    <mobile:Command ID="cmd" Runat="Server" OnClick="cmd_Click">Upload</mobile:Command>


    CODE to uplaod :

    System.Web.UI.WebControls.FileUpload ftxt;

    ftxt = (System.Web.UI.WebControls.FileUpload)Form1.Header.FindControl("ftxt");

    string ftxtstring = Request["ctl00:ftxt"];

    ftxtstring = ftxtstring.Remove(0, 5);

    string file = System.IO.Path.GetFileName(ftxtstring);

    string path = Server.MapPath("Test//") + file;

    FileStream fs = File.Create(path);

    byte[] bt = File.ReadAllBytes(ftxtstring);

    fs.Read(bt, 0, Convert.ToInt32(bt.Length));


    DirectoryInfo Folder = new DirectoryInfo(path);

    string FilePathSave = Folder.ToString();

    File.WriteAllBytes(FilePathSave, bt);



    This is working perfectly in OpenWave Emulator but when i run in IE or Mozilla It is not able to render File Upload Control 

    please help me and send me your code if you have ....pls i need urgent help  

    Thank You


    Friday, March 21, 2008 12:42 AM

All replies

  • User-632206158 posted

    hi i have tried your code in a mobile web form, but i seem to be gettin an error

    The type name 'ftxt' does not exist in the type 'System.Web.UI.WebControls.FileUpload'

     i was wondering if you could send me your coding for the mobile upload, if possible.

     Thank You


    Tuesday, April 15, 2008 6:23 PM
  • User606025103 posted


    I am too facing the same problem.
    On lots googling i got that http put method supported with Mobile IE for WM6.0
    I have tried it using HTTPWEBREQUEST method. But to read local file it takes System.IO.Stream method,
    but this method then look for server path only not the client hence process get fails,

    If you got the solution for the upload file using mobile IE, please post any hint how to do this.

    Also oera browser 8.0 and later supports file upload using POST method and works fine.
    one thing also i am dowing general ASP.NET 2.0 web pages not worked on Compact frame work.

    Thanks in advance.

    Monday, May 26, 2008 1:57 AM
  • User264517204 posted

    Hi Jay I have face the problem while

    string ftxtstring = Request["ctl00:ftxt"];

    it's give null reference expention,


    if u have solution then give me as soon possible,


    thanks for developed these code for  and help to other guys,

    thanks so much 

    plz give me ypur email id and your contacts, know me about your self..



    give me reply as soon as possible


    thanks one's again


    Friday, September 5, 2008 2:17 AM