Solved

Problem with file control and Update Panel

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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…

747 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

9 Experts available now in Live!

Get 1:1 Help Now