OnClientUploadStarted
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="usercpntrol.ascx.cs" Inherits="usercpntrol" %> <script type="text/javascript"> function uploadStarted(sender,args) { var data; data = document.getElementById("ucattachfile_TextBox1").innerHTML; if (data == "") { document.getElementById("Label1").innerHTML = "text value req"; return; } else { document.getElementById("Label1").innerHTML = "uploadStarted"; } } function test() { } function test2() { } </script> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Panel ID="Panel1" runat="server"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <ajaxToolkit:AsyncFileUpload ID="AsyncFileUpload1" OnClientUploadComplete="test" OnClientUploadError="test2" OnClientUploadStarted="uploadStarted" runat="server" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> </div>
TextBox
<input>
innerHTML
value
data = document.getElementById("ucattachfile_TextBox1").value;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)