Re: How do I code for single file manual upload?

  •  02-14-2012, 10:47 AM

    Re: How do I code for single file manual upload?

    One more issue:
     
    I'm now getting the following error:
     
    "Index out of range Parameter name: index Actual value was 0." 
     
     I'm not sure what I'm missing.  My code is as follows:
     
    Imports CuteWebUI
     
    Partial Class me_Files
        Inherits System.Web.UI.Page
     
        Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
             dim filename, filesize as String
     
             filename = uploader1.Items(0).FileName
             filesize = uploader1.Items(0).FileSize
       End Sub
     End Class
     ----------ASPx Page---------------
    <%@ Page Title="" Language="VB" MasterPageFile="~/SSFMaster.master" AutoEventWireup="false" CodeFile="Files.aspx.vb" Inherits="me_Files" %>
     
     <CuteWebUI:UploadAttachments ID="uploader1" runat="server" MultipleFilesUpload="false">
                </CuteWebUI:UploadAttachments>
     
    <%@ Register Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" TagPrefix="CuteWebUI" %> 
     
     <%@ MasterType VirtualPath="~/SSFMaster.master" %>
     
    <asp:Content ID="Content1" ContentPlaceHolderID="CHead" Runat="Server">
        <link rel="Stylesheet" href="../css/aStyles.css" type="text/css" media="screen" />
    </asp:Content>
     
    <asp:Content ID="Content2" ContentPlaceHolderID="CMain" Runat="Server">
        <div> 
              <CuteWebUI:UploadAttachments ID="uploader1" runat="server" MultipleFilesUpload="false">
                </CuteWebUI:UploadAttachments>
             <asp:Button ID="btnUpload" runat="server" Text="Upload" /> 
       </div>
    </asp:Content> 
View Complete Thread