Solved

Problem with file control and Update Panel

Posted on 2009-05-11
1
732 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

770 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