Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FileUpload Control within UpdatePanel

0 views
Skip to first unread message

GaryDean

unread,
May 4, 2008, 3:58:12 PM5/4/08
to
Is there any way to make an asp FileUpload control work within an
UpdatePanel?
Thanks,
Garyh

bruce barker

unread,
May 5, 2008, 12:05:14 AM5/5/08
to
no. the update panel uses xmlhttprequest to post the form data which can
not access a file. you can use javascript and hidden iframes to upload a
file.

-- bruce (sqlwork.com)

marss

unread,
May 5, 2008, 12:43:26 AM5/5/08
to

Steven Cheng [MSFT]

unread,
May 5, 2008, 3:31:50 AM5/5/08
to
Hi Gary,

You can have a look at the blog article from marss. Here are some other
articles I've found mentioned some approaches create ajax stile uploading:

#Simple AJAX File Upload
http://www.codeproject.com/KB/ajax/simpleajaxupload.aspx

#Create An Ajax Style File Upload
http://geekswithblogs.net/rashid/archive/2007/08/01/Create-An-Ajax-Style-Fil
e-Upload.aspx

However, I still think directly put fileupload into updatepanel maybe
problem prone since it is not designed to hold fileupload task(multi-part
form data). Is there any particular requirement that you have to make file
upload via ajax style?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "GaryDean" <gdeanb...@newsgroup.nospam>
>Subject: FileUpload Control within UpdatePanel
>Date: Sun, 4 May 2008 12:58:12 -0700

bruce barker

unread,
May 5, 2008, 12:21:01 PM5/5/08
to
you can upload file data via xmlhttprequest (its just base64 encode, easy
enough to do with javascript), you just can not read the file with javascript
to get the data.

-- bruce (sqlwork.com)

Steven Cheng [MSFT]

unread,
May 5, 2008, 10:53:23 PM5/5/08
to
Thanks for your input Bruce,

Yes, client-side script cannot directly access local file system and read
data. In web page, it will require the user to interactively select and use
html file input to upload file.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Anil Abraham

unread,
May 28, 2008, 2:12:21 AM5/28/08
to

yes make use of trigerrs as follows

<Triggers>
<asp:PostBackTrigger ControlID="btnUpload" />
</Triggers>

0 new messages