<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test_AjaxUpload.aspx.cs" Inherits="Test_AjaxUpload" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" AllowedFileTypes="jpg,jpeg" MaximumNumberOfFiles="10" OnUploadComplete="AjaxFileUpload1_UploadComplete" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html>
protected void Page_Load(object sender, EventArgs e) { } protected void AjaxFileUpload1_UploadComplete(object sender, AjaxFileUploadEventArgs e) { TextBox1.Text = e.FileName; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)