Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Mobile > PDA Issue

Reply
Thread Tools

PDA Issue

 
 
deepak
Guest
Posts: n/a
 
      06-10-2009
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PDA Issue deepak ASP .Net Web Controls 1 06-24-2009 01:52 PM
Windows CE 5.0 PDA - Wireless Network Security issue =?Utf-8?B?Q2xhcmE=?= Wireless Networking 1 11-05-2007 08:17 PM
Wireless Access Point for PDA =?Utf-8?B?Ym9i?= Wireless Networking 1 10-11-2004 10:01 AM
Wireless Networkng with PDA Ed Wireless Networking 6 10-01-2004 05:09 PM
Windows PDA applications or ASP.NET web PDA applications?? Anil ASP .Net Mobile 1 07-31-2004 08:38 AM



Advertisments