Hi hamed415,
Both methods works fine for me. Below is my test example page. Does it work for you?
Can you show me how you used these methods ? So I can check it for you.
- <%@ Page Language="C#" %>
-
- <%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="CuteWebUI" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
- <script runat="server">
- protected void btnDelete_Click(object sender, EventArgs e)
- {
- for (int i = uploader1.Items.Count - 1; i >= 0; i--)
- {
- uploader1.DeleteAttachment(i);
- }
- }
- </script>
-
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title>example</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <CuteWebUI:UploadAttachments ID="uploader1" runat="server" TempDirectory="tempFiles">
- </CuteWebUI:UploadAttachments>
- <br />
- <asp:Button ID="btnDelete" runat="server" Text="remove" OnClick="btnDelete_Click" />
- </form>
- </body>
- </html>
Regards,
Ken