PDA Issue




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"

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


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


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()


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
writeToMsgwindow("File Collection was not found")

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

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

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

Do While index < curAttachments.Count 'Create table
with attachment details
curAttachments.Item(index), curAttachmentsSize.Item(index))
index = index + 1
'Changes for WAP Attachment Issue ends -- Jeywin Lizy
writeToMsgwindow("Can't attach a file larger than 10
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.



Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question