[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 746
  • Last Modified:

Problem with file control and Update Panel

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
KaranGupta
Asked:
KaranGupta
1 Solution
 
svellutoCommented:
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now