The version that I have is 2.0.20081118
Here is my code:
<CuteWebUI:UploadAttachments runat="server" ManualStartUpload="true" ID="Uploader1"
InsertText="Browse Files (Max 1M)" >
<VALIDATEOPTION MaxSizeKB="1024" />
</CuteWebUI:UploadAttachments>
<br />
<br />
<asp:Button runat="server" ID="SubmitButton" OnClick="SubmitButton_Click" OnClientClick="return submitbutton_click()" Text="Submit" />
<br />
<br />
<div>
<asp:ListBox runat="server" ID="ListBoxEvents" Width="400"></asp:ListBox>
</div>
<br />
<br />
<asp:Button ID="ButtonPostBack" Text="This is a PostBack button" runat="server" />
Protected Sub InsertMsg(ByVal msg As String)
ListBoxEvents.Items.Insert(0, msg)
ListBoxEvents.SelectedIndex = 0
End Sub
Protected Sub ButtonPostBack_Click(ByVal sender As Object, ByVal e As EventArgs)
InsertMsg(
"You clicked a PostBack Button.")
End Sub
Protected Sub SubmitButton_Click(ByVal sender As Object, ByVal e As EventArgs)
InsertMsg(
"You clicked the Submit Button.")
InsertMsg(
"You have uploaded " & uploadcount & "/" & Uploader1.Items.Count & " files.")
End Sub
Protected Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)
uploadcount += 1
Dim uploader As CuteWebUI.Uploader = DirectCast(sender, CuteWebUI.Uploader)
InsertMsg(
"File uploaded! " & args.FileName & ", " & args.FileSize & " bytes.")
'Copys the uploaded file to a new location.
args.CopyTo(Session(
"CurrentPath").ToString)
End Sub
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
SubmitButton.Attributes(
"itemcount") = Uploader1.Items.Count.ToString()
lblUploadPath.Text = Session(
"CurrentPath").ToString
updpnlUpload.Update()
End Sub