File browser does not work

  •  07-11-2013, 6:14 PM

    File browser does not work

    Hello, with the attached code I'm attempting to upload mutliple files.

    When you click on the upload multiple files now button the file browse window does not open in order to select files to upload.

    What could be the cause?

     

    The bin folder of my solution conatains the ajaxuploader.lic and the cutewebui.ajaxuploader.dll

    Page

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

    <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

    <title></title>

    </head>

    <body>

    <form id="form1" runat="server">

    <div>

    <asp:ScriptManager runat="server" ID="scrm"></asp:ScriptManager>

    <asp:UpdatePanel runat="server" ID="UpdatePanel1">

    <ContentTemplate>

    <fieldset>

    <legend>Pictures</legend>

    <div id="pnlAddImage" runat="server">

    <CuteWebUI:UploadAttachments InsertText="Upload Multiple files Now" runat="server"

    ID="Attachments1" MultipleFilesUpload="true">

    <InsertButtonStyle />

    </CuteWebUI:UploadAttachments>

    <p>

    <asp:Button ID="ButtonDeleteAll" runat="server" Text="Delete All" />&nbsp;&nbsp;

    <asp:Button ID="ButtonTellme" runat="server" Text="Show Uploaded File Information" />

    </p>

    <p>

    Server Trace:<br />

    <asp:ListBox runat="server" ID="ListBoxEvents" />

    </p>

    </div>

    </fieldset>

    </ContentTemplate>

    </asp:UpdatePanel>

    </div>

    </form>

    </body>

    </html>

    Code Behind

    Imports CuteWebUI

    Partial Class _Default

    Inherits System.Web.UI.Page

    Public Sub InsertMsg(ByVal msg As String)

    ListBoxEvents.Items.Insert(0, msg)

    ListBoxEvents.SelectedIndex = 0

    End Sub

    Public Sub Attachments1_AttachmentAdded(ByVal sender As Object, ByVal args As AttachmentItemEventArgs)

    InsertMsg(args.Item.FileName + " has been uploaded.")

    End Sub

    Public Sub ButtonDeleteAll_Click(ByVal sender As Object, ByVal e As EventArgs)

    InsertMsg("Attachments1.DeleteAllAttachments();")

    Attachments1.DeleteAllAttachments()

    End Sub

    Public Sub ButtonTellme_Click(ByVal sender As Object, ByVal e As EventArgs)

    ListBoxEvents.Items.Clear()

    For Each item As AttachmentItem In Attachments1.Items

    InsertMsg(item.FileName & ", " & item.FileSize & " bytes.")

    'Copies the uploaded file to a new location.

    'item.CopyTo("c:\\temp\\"& args.FileName)

    'You can also open the uploaded file's data stream.

    'System.IO.Stream data = item.OpenStream()

    Next

    End Sub

    End Class

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems