Solved

Problem with file control and Update Panel

Posted on 2009-05-11
1
731 Views
Last Modified: 2013-11-08
Hi

I am using file upload control inside the UpdatePanel

But I was not getting the object of fileupload control

then I added following code
ScriptManager.GetCurrent(Page).RegisterPostBackControl(txtSelectVideo);
where txtSelectVideo is the ID of File upload control

But Now I am getting an error

Control with ID 'txtSelectVideo' being registered through RegisterAsyncPostBackControl or RegisterPostBackControl must implement either INamingContainer, IPostBackDataHandler, or IPostBackEventHandler.
0
Comment
Question by:KaranGupta
1 Comment
 
LVL 7

Accepted Solution

by:
svelluto earned 500 total points
ID: 24358931
The File Upload Control does not work inside an Update Panel due to Security Reasons.

The AsyncPostback is executed on the Client-Side, and not allowed to access files on the user's system.

Though, with a little bit of searching, I have found this nice blog post, which gives an alternative:

http://geekswithblogs.net/ranganh/archive/2008/04/01/file-upload-in-updatepanel-asp.net-ajax.aspx

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Angular- another way of coding hide and display 3 40
Replace &lt; with < 14 56
Turn on intranet settings 1 40
Regex in JavaScript to validate US phone number with hyphens 3 28
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now