<%@ 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>
如果使用文件上传控件选择视频文件,则单击文件上传按钮不会解析网页。一切都在我的本地机器上运行。
如果没有选择文件,那么它会转到我期望的网站。有谁知道为什么会这样?