<%@ Page Title="Email Attachments" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxUploader" Namespace="AjaxUploader.Controls" TagPrefix="au" %> 
<script runat="server"> protected void BtnSend_Click(object sender, EventArgs e)
 {
 // In production, send email with attachments here
 lblStatus.Text = "Email sent to " + Server.HtmlEncode(txtTo.Text) + " with attachments.";
 lblStatus.Visible = true;
 }
</script> 
<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">Email Attachments - AjaxUploader v5.2 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">Email Attachments</asp:Content> 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> 
<style> .compose-box {
 border: 1px solid #d1d5db; border-radius: 8px; padding: 12px;
 background: #fff; max-width: 500px;
 }
 .compose-toolbar {
 display: flex; align-items: center; gap: 8px;
 border-top: 1px solid #e5e7eb; padding-top: 10px; margin-top: 8px;
 }
</style> 
<div class="demo-card"> <div class="demo-card-header">Email Attachments</div> <div class="demo-card-body"> <p class="demo-description"> Email compose form with attachment uploader. Files appear as compact chips
 below the compose area. Uses Web Forms controls for the email fields.
 </p> <div class="compose-box"> <div class="mb-2"> <label class="form-label small fw-semibold" for="<%= txtTo.ClientID %>">To</label> <asp:TextBox ID="txtTo" runat="server" CssClass="form-control form-control-sm" placeholder="recipient@example.com" /> </div> <div class="mb-2"> <label class="form-label small fw-semibold" for="<%= txtSubject.ClientID %>">Subject</label> <asp:TextBox ID="txtSubject" runat="server" CssClass="form-control form-control-sm" placeholder="Subject" /> </div> <label class="form-label small fw-semibold" for="<%= txtBody.ClientID %>">Message</label> <asp:TextBox ID="txtBody" runat="server" TextMode="MultiLine" Rows="4"
 CssClass="form-control form-control-sm border-0" placeholder="Write your message..." /> <au:AjaxFileUpload ID="Uploader1" runat="server"
 AllowMultiple="true"
 AutoUpload="true"
 ShowProgress="true"
 ButtonText="Attach Files" /> <div class="compose-toolbar"> <asp:Button ID="BtnSend" runat="server" Text="Send"
 CssClass="btn btn-primary btn-sm" OnClick="BtnSend_Click" /> </div> </div> <asp:Label ID="lblStatus" runat="server" CssClass="d-block mt-3 text-success" role="status" aria-live="polite" Visible="false" /> <div class="code-panel"> <pre><code>&lt;asp:TextBox ID="txtTo" runat="server" CssClass="form-control" /&gt;
&lt;asp:TextBox ID="txtSubject" runat="server" CssClass="form-control" /&gt;
&lt;asp:TextBox ID="txtBody" runat="server" TextMode="MultiLine" /&gt;

&lt;au:AjaxFileUpload ID="Uploader1" runat="server"
 AllowMultiple="true"
 AutoUpload="true"
 ShowProgress="true"
 ButtonText="Attach Files" /&gt;

&lt;asp:Button ID="BtnSend" runat="server" Text="Send"
 OnClick="BtnSend_Click" /&gt;</code></pre> </div> </div>
</div> 
</asp:Content>
