Hi AbuzarAns,
Check with below.
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager runat="server">
</asp:ToolkitScriptManager>
<asp:AjaxFileUpload ID="AjaxFileUpload11" runat="server" MaximumNumberOfFiles="5"
Width="400px" OnUploadComplete="OnUploadComplete" />
<asp:Button Text="Save" runat="server" OnClick="Save" />
<input type="submit" value="Custom Upload Button" runat="server" onserverclick="Save"
onclick="$('.ajax__fileupload_uploadbutton').trigger('click');" />
</form>
</body>
</html>
C#
protected void OnUploadComplete(object sender, AjaxFileUploadEventArgs e)
{
string fileName = Path.GetFileName(e.FileName);
AjaxFileUpload11.SaveAs(Server.MapPath("~/Uploads/" + fileName));
}
protected void Save(object sender, EventArgs e)
{
}
But Button click event is raised first and then OnUploadComplete event will be raised.