<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UploadVideo.ascx.cs" Inherits="Controls_UploadVideo" %>
<h4>Select a video file to upload:</h4>
<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:FileUpload id="fuUploadVideo"
runat="server">
</asp:FileUpload>
<br /><br />
<asp:Button id="btnUploadVideo"
Text="Upload file"
OnClick="btnUploadVideo_Click"
runat="server">
</asp:Button>
<hr />
<asp:Label id="UploadStatusLabel"
runat="server">
</asp:Label>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnUploadVideo" />
</Triggers>
If use the file upload control to select a video file then clicking the file upload button does not resolve a webpage. Everything is being run on my local machine.
If no file is selected then it goes to the website I expect. Does anyone know why this might be the case?
So far I’m aware, standard
FileUploaddoesn’t work inside an UpdatePanel. You could use AsyncFileUpload control instead.