Form with File Upload

Form with File Upload

Embed AjaxFileUpload as a field within a Web Forms page alongside TextBox, DropDownList, and Button controls. The uploaded file ID is stored in a HiddenField and submitted with the postback.

Drag & drop files here, or paste from clipboard
<asp:TextBox ID="txtName" runat="server" CssClass="form-control" />
<asp:DropDownList ID="ddlCategory" runat="server" CssClass="form-select">
    <asp:ListItem Text="General" Value="general" />
</asp:DropDownList>

<au:AjaxFileUpload ID="Uploader1" runat="server"
    AutoUpload="true"
    ShowProgress="true"
    OnClientUploadComplete="onFileUploaded" />
<asp:HiddenField ID="hdnFileId" runat="server" />

<asp:Button ID="BtnSubmit" runat="server" Text="Submit"
    CssClass="btn btn-primary" OnClick="BtnSubmit_Click" />