FileUpload Control within UpdatePanel

G

GaryDean

Is there any way to make an asp FileUpload control work within an
UpdatePanel?
Thanks,
Garyh
 
B

bruce barker

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

Steven Cheng [MSFT]

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:
(e-mail address removed).

==================================================
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.

--------------------
 
B

bruce barker

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

Steven Cheng [MSFT]

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:
(e-mail address removed).

==================================================
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.

--------------------
From: =?Utf-8?B?YnJ1Y2UgYmFya2Vy?= <[email protected]>
References: <#[email protected]>
Subject: RE: FileUpload Control within UpdatePanel
Date: Mon, 5 May 2008 09:21:01 -0700
 
A

Anil Abraham

Is there any way to make an aspFileUploadcontrolwork within anUpdatePanel?
Thanks,
Garyh

yes make use of trigerrs as follows

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

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,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top