PDA Issue

Discussion in 'ASP .Net Web Controls' started by deepak, Jun 10, 2009.

  1. deepak

    deepak Guest

    Hi,

    Using IE 6.0,IE 7.0,IE 8.0, We are not able to upload the
    attachments(*.doc,*.pdf,*.jpeg) in PDA Device. Only text file is able to
    attach but in deksotp it works fine for all file types.

    We are using the following controls which is generating at runt time.

    Button: Dim htb As New HtmlControls.HtmlInputButton("Submit")

    Page Name: MultipleAttachment.aspx

    Design Code :->
    <%@ page language="VB" autoeventwireup="false"
    inherits="AttachmentHandler.multipleAttachment" validaterequest="false"
    CodeFile="multipleAttachment.aspx.vb" EnableEventValidation="false" %>
    <%@ OutputCache Duration="1" VaryByParam="None" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>MultipleAttachmentPage</title>

    </head>
    <body>

    <form action="" runat="server" method="POST" id="form1"
    enctype="multipart/form-data">
    <asp:Label ID="Label1" runat="server" Text="Add
    Attachment"></asp:Label><br />
    <br />
    <input type="file" id="Browse" name="Browse" />

    </form>
    </body>
    </html>


    User can browse the file using Browse button and the Upload button generates
    at run time
    [Dim htb As New HtmlControls.HtmlInputButton("Submit")] when page
    loads.After clicking on Upload the following Submit() function called.
    In this function , for PDA, System.Web.HttpContext.Current.Request.Files
    always does not contain anything and hence file_coll.Item(0).FileName


    Sub AddNewAttachment(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim index As Integer
    Dim file_coll As HttpFileCollection
    Dim uploadedFile As HttpPostedFile
    Dim fname As String
    Dim filesize As String
    'Changes for WAP Attachment Issue starts -- Jeywin Lizy
    Dim curAttachmentsfile As New ArrayList()
    Dim curAttachments As New ArrayList()
    Dim curAttachmentsSize As New ArrayList()

    Try



    If (Not Session(curTasksAttachFile) Is Nothing) Then

    curAttachmentsfile = Session(curTasksAttachFile)
    curAttachments = Session(curTasksAttach)
    curAttachmentsSize = Session(curTasksAttachSize)
    End If
    'Changes for WAP Attachment Issue ends -- Jeywin Lizy
    If assignmentAuthenticateandGet() Then

    'Dim req As System.Web.HttpRequest

    file_coll = System.Web.HttpContext.Current.Request.Files 'Get file
    collection from request

    If (file_coll.Item(0).FileName = "") Then 'jeywin lizy
    'If file_coll.Count = 0 Then 'Check
    if file collection contains file(s)

    'Throw New local_exception("File Collection was not
    found")
    writeToMsgwindow("File Collection was not found")
    Else

    If (file_coll.Item(0).ContentLength = 0) Then
    'jeywin lizy
    'Throw New local_exception("Cannot attach empty
    file- upload file")
    writeToMsgwindow("Cannot attach empty file-
    upload file")

    End If

    End If


    uploadedFile = file_coll.Item(0)
    fname = uploadedFile.FileName
    filesize = Request.ContentLength

    If Request.ContentLength < 10485760 Then

    If fname <> "" Then
    'Changes for WAP Attachment Issue starts --
    Jeywin Lizy
    If (file_coll.Item(0).ContentLength > 0) Then
    'jeywin lizy
    curAttachmentsfile.Add(file_coll)
    curAttachments.Add(fname)
    curAttachmentsSize.Add(filesize)

    Session(curTasksAttachFile) =
    curAttachmentsfile
    Session(curTasksAttach) = curAttachments
    Session(curTasksAttachSize) =
    curAttachmentsSize

    End If
    'Changes for WAP Attachment Issue ends --
    Jeywin Lizy
    End If
    'Changes for WAP Attachment Issue starts -- Jeywin
    Lizy
    index = 0

    Do While index < curAttachments.Count 'Create table
    with attachment details
    addRowtoTable(attachmentTable,
    curAttachments.Item(index), curAttachmentsSize.Item(index))
    index = index + 1
    Loop
    'Changes for WAP Attachment Issue ends -- Jeywin Lizy
    Else
    writeToMsgwindow("Can't attach a file larger than 10
    MB")
    End If


    End If


    Catch ex As Exception
    'Throw ex
    writeToMsgwindow(ex.Message()) 'Changes for WAP Attachment
    Issue starts -- Jeywin Lizy

    End Try

    End Sub


    It seems that rendering not happening for these file types in PDA for
    HTMLInput button type but it is happening only in desktop. Please help us in
    case; we need to change the control type.

    Regards,
    Deepak
    deepak, Jun 10, 2009
    #1
    1. Advertising

  2. deepak

    deepak Guest

    Any clue....?

    Regards,
    Deepak

    "deepak" wrote:

    > Hi,
    >
    > Using IE 6.0,IE 7.0,IE 8.0, We are not able to upload the
    > attachments(*.doc,*.pdf,*.jpeg) in PDA Device. Only text file is able to
    > attach but in deksotp it works fine for all file types.
    >
    > We are using the following controls which is generating at runt time.
    >
    > Button: Dim htb As New HtmlControls.HtmlInputButton("Submit")
    >
    > Page Name: MultipleAttachment.aspx
    >
    > Design Code :->
    > <%@ page language="VB" autoeventwireup="false"
    > inherits="AttachmentHandler.multipleAttachment" validaterequest="false"
    > CodeFile="multipleAttachment.aspx.vb" EnableEventValidation="false" %>
    > <%@ OutputCache Duration="1" VaryByParam="None" %>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    >
    > <html xmlns="http://www.w3.org/1999/xhtml" >
    > <head runat="server">
    > <title>MultipleAttachmentPage</title>
    >
    > </head>
    > <body>
    >
    > <form action="" runat="server" method="POST" id="form1"
    > enctype="multipart/form-data">
    > <asp:Label ID="Label1" runat="server" Text="Add
    > Attachment"></asp:Label><br />
    > <br />
    > <input type="file" id="Browse" name="Browse" />
    >
    > </form>
    > </body>
    > </html>
    >
    >
    > User can browse the file using Browse button and the Upload button generates
    > at run time
    > [Dim htb As New HtmlControls.HtmlInputButton("Submit")] when page
    > loads.After clicking on Upload the following Submit() function called.
    > In this function , for PDA, System.Web.HttpContext.Current.Request.Files
    > always does not contain anything and hence file_coll.Item(0).FileName
    >
    >
    > Sub AddNewAttachment(ByVal sender As Object, ByVal e As System.EventArgs)
    > Dim index As Integer
    > Dim file_coll As HttpFileCollection
    > Dim uploadedFile As HttpPostedFile
    > Dim fname As String
    > Dim filesize As String
    > 'Changes for WAP Attachment Issue starts -- Jeywin Lizy
    > Dim curAttachmentsfile As New ArrayList()
    > Dim curAttachments As New ArrayList()
    > Dim curAttachmentsSize As New ArrayList()
    >
    > Try
    >
    >
    >
    > If (Not Session(curTasksAttachFile) Is Nothing) Then
    >
    > curAttachmentsfile = Session(curTasksAttachFile)
    > curAttachments = Session(curTasksAttach)
    > curAttachmentsSize = Session(curTasksAttachSize)
    > End If
    > 'Changes for WAP Attachment Issue ends -- Jeywin Lizy
    > If assignmentAuthenticateandGet() Then
    >
    > 'Dim req As System.Web.HttpRequest
    >
    > file_coll = System.Web.HttpContext.Current.Request.Files 'Get file
    > collection from request
    >
    > If (file_coll.Item(0).FileName = "") Then 'jeywin lizy
    > 'If file_coll.Count = 0 Then 'Check
    > if file collection contains file(s)
    >
    > 'Throw New local_exception("File Collection was not
    > found")
    > writeToMsgwindow("File Collection was not found")
    > Else
    >
    > If (file_coll.Item(0).ContentLength = 0) Then
    > 'jeywin lizy
    > 'Throw New local_exception("Cannot attach empty
    > file- upload file")
    > writeToMsgwindow("Cannot attach empty file-
    > upload file")
    >
    > End If
    >
    > End If
    >
    >
    > uploadedFile = file_coll.Item(0)
    > fname = uploadedFile.FileName
    > filesize = Request.ContentLength
    >
    > If Request.ContentLength < 10485760 Then
    >
    > If fname <> "" Then
    > 'Changes for WAP Attachment Issue starts --
    > Jeywin Lizy
    > If (file_coll.Item(0).ContentLength > 0) Then
    > 'jeywin lizy
    > curAttachmentsfile.Add(file_coll)
    > curAttachments.Add(fname)
    > curAttachmentsSize.Add(filesize)
    >
    > Session(curTasksAttachFile) =
    > curAttachmentsfile
    > Session(curTasksAttach) = curAttachments
    > Session(curTasksAttachSize) =
    > curAttachmentsSize
    >
    > End If
    > 'Changes for WAP Attachment Issue ends --
    > Jeywin Lizy
    > End If
    > 'Changes for WAP Attachment Issue starts -- Jeywin
    > Lizy
    > index = 0
    >
    > Do While index < curAttachments.Count 'Create table
    > with attachment details
    > addRowtoTable(attachmentTable,
    > curAttachments.Item(index), curAttachmentsSize.Item(index))
    > index = index + 1
    > Loop
    > 'Changes for WAP Attachment Issue ends -- Jeywin Lizy
    > Else
    > writeToMsgwindow("Can't attach a file larger than 10
    > MB")
    > End If
    >
    >
    > End If
    >
    >
    > Catch ex As Exception
    > 'Throw ex
    > writeToMsgwindow(ex.Message()) 'Changes for WAP Attachment
    > Issue starts -- Jeywin Lizy
    >
    > End Try
    >
    > End Sub
    >
    >
    > It seems that rendering not happening for these file types in PDA for
    > HTMLInput button type but it is happening only in desktop. Please help us in
    > case; we need to change the control type.
    >
    > Regards,
    > Deepak
    >
    >
    deepak, Jun 24, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sham Yemul
    Replies:
    3
    Views:
    562
    William Ryan eMVP
    Mar 3, 2004
  2. Luiz Rafael Fernandes

    Win/WEB/PDA in MVC model...

    Luiz Rafael Fernandes, May 11, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    385
    Natty Gur
    May 11, 2004
  3. Daniel Passwater via DotNetMonster.com

    C# compact framework: IO problem: app running on PDA can't find file.

    Daniel Passwater via DotNetMonster.com, Dec 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    746
    Craig Deelsnyder
    Jan 1, 2005
  4. Anil
    Replies:
    1
    Views:
    421
    Jean-Luc David [MS-MVP]
    Jul 31, 2004
  5. deepak

    PDA Issue

    deepak, Jun 10, 2009, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    953
    deepak
    Jun 10, 2009
Loading...

Share This Page