<%@ Page Title="Support Ticket Attachments" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxUploader" Namespace="AjaxUploader.Controls" TagPrefix="au" %>

<script runat="server">
    protected void BtnSubmit_Click(object sender, EventArgs e)
    {
        lblResult.Text = "Ticket submitted: " + Server.HtmlEncode(txtSubject.Text)
            + " (Priority: " + ddlPriority.SelectedValue + ")";
        lblResult.Visible = true;
    }
</script>

<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">Support Ticket Attachments - AjaxUploader v5.0 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">Support Ticket Attachments</asp:Content>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

<div class="demo-card">
    <div class="demo-card-header">Support Ticket Attachments</div>
    <div class="demo-card-body">
        <p class="demo-description">
            A support ticket form with file attachments. Users can attach screenshots,
            logs, or documents when submitting a bug report or support request.
            Uses Web Forms controls for all form fields.
        </p>

        <div style="max-width: 500px;">
            <div class="mb-3">
                <label class="form-label">Subject</label>
                <asp:TextBox ID="txtSubject" runat="server" CssClass="form-control" placeholder="Brief description of the issue" />
            </div>
            <div class="mb-3">
                <label class="form-label">Priority</label>
                <asp:DropDownList ID="ddlPriority" runat="server" CssClass="form-select">
                    <asp:ListItem Text="Low" Value="low" />
                    <asp:ListItem Text="Medium" Value="medium" Selected="True" />
                    <asp:ListItem Text="High" Value="high" />
                    <asp:ListItem Text="Critical" Value="critical" />
                </asp:DropDownList>
            </div>
            <div class="mb-3">
                <label class="form-label">Description</label>
                <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Rows="3"
                    CssClass="form-control" placeholder="Describe the issue in detail..." />
            </div>
            <div class="mb-3">
                <label class="form-label">Attachments (screenshots, logs, etc.)</label>
                <au:AjaxFileUpload ID="Uploader1" runat="server"
                    AllowMultiple="true"
                    AutoUpload="true"
                    ShowProgress="true"
                    ButtonText="Attach Files" />
            </div>
            <asp:Button ID="BtnSubmit" runat="server" Text="Submit Ticket"
                CssClass="btn btn-primary" OnClick="BtnSubmit_Click" />
            <asp:Label ID="lblResult" runat="server" CssClass="d-block mt-3 text-success fw-bold" Visible="false" />
        </div>

        <div class="code-panel">
            <pre><code>&lt;asp:TextBox ID="txtSubject" runat="server" CssClass="form-control" /&gt;
&lt;asp:DropDownList ID="ddlPriority" runat="server" CssClass="form-select"&gt;
    &lt;asp:ListItem Text="Low" Value="low" /&gt;
    &lt;asp:ListItem Text="Medium" Value="medium" Selected="True" /&gt;
    &lt;asp:ListItem Text="High" Value="high" /&gt;
&lt;/asp:DropDownList&gt;
&lt;asp:TextBox ID="txtDescription" 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="BtnSubmit" runat="server" Text="Submit Ticket"
    OnClick="BtnSubmit_Click" /&gt;</code></pre>
        </div>
    </div>
</div>

</asp:Content>
