PDA Issue

D

deepak

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
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top