Solved

Problem with file control and Update Panel

Posted on 2009-05-11
1
734 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery form 9 42
Use "if not" in a condition 2 19
Validating number not work with decimal 4 27
Starting to use Git with Visual  Studio Online 1 24
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

733 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