Re: Hide browse button for UploadPersistedFile control

  •  10-06-2008, 8:37 AM

    Re: Hide browse button for UploadPersistedFile control

    I now have this source:
     
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ImageUploader.ascx.cs" Inherits="CatenaLogic.Website.Controls.ImageUploader" %>

    <div class="imageUploader">

    <%-- Image --%>

    <asp:Image ID="previewImage" runat="server" CssClass="photo" />

     

    <%-- Controls --%>

    <div class="controls">

     

    <%-- Progress --%>

    <asp:Panel ID="uploadProgress" runat="server" CssClass="progress" />

     

    <%-- Buttons --%>

    <asp:LinkButton ID="editButton" runat="server" CssClass="editButton" meta:resourcekey="editButtonResource" />

    <asp:LinkButton ID="cancelButton" runat="server" CssClass="cancelButton" meta:resourcekey="cancelButtonResource" />

    <asp:LinkButton ID="removeButton" runat="server" CssClass="removeButton" meta:resourcekey="removeButtonResource" />

     

    </div>

     

    <%-- Uploader --%>

    <CuteWebUI:UploadPersistedFile runat="server" ID="imageUploader" UploadType="Auto" MultipleFilesUpload="false"

    CancelButtonID="cancelButton" InsertButtonID="editButton" ProgressCtrlID="uploadProgress" ShowProgressInfo="false"

     

    OnFileUploaded="imageUploader_FileUploaded" OnFileChanged="imageUploader_FileChanged">

    <ValidateOption AllowedFileExtensions="jpg,jpeg,gif,png" />

    </CuteWebUI:UploadPersistedFile>

    </div>

    Initially, the control looks fine:
     
    However, when I select a file to upload, I get this error:
     
     
     
     
    Any ideas what can be wrong? As you can see, the progress bar does not show in the progressbar at the top.
     
    Also, is it possible to hide the browse button during the uploading process? I want the upload (edit) button to be replaced by the cancel upload button during the upload process.
     
     Thanks in advance!
View Complete Thread