Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 774089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:04:23+00:00 2026-05-14T19:04:23+00:00

I have a basic page to which I’m adding an uploader control based on

  • 0

I have a basic page to which I’m adding an uploader control based on Bulk Uploader at c-sharpcorner.com and the control is in a jQuery-faded div based on yesdegisn

The Bulk Uploader has two server side event handlers for two buttons–Add and Remove. After clicking these buttons, the fade disappears and you’re back to the basic page–if the user needs to add more files, this is not desirable. The ArrayList of files added to a ListBox is maintained, but I have to click the “fade-in” link (LinkButton id=”lnkDocumentUpload”) to display this window again.

I also need the control to POST to UploadPost.aspx, and it doesn’t work either. Clicking the upload button(<asp:Button ID="btnUpload" runat="server" />) has the same behavior described above–fade disappears, data is retained, and no POST. I’ve surrounded the control with

<form id="frmUpload" action="~/UploadPost.aspx">
...
    <asp:Button ID="btnUpload" runat="server" Text="Upload"/>
</form>

A LinkButton activates the fade in jQuery via

$("#lnkDocumentUpload").click(function() {
    centerPopup();
    loadPopup();
});

MyUploader markup:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyUploader.ascx.cs" Inherits="Controls.MyUploader" %>
<form id="frmUpload" action="~/UploadPost.aspx">
<table>
    <tr>
        <td style="width: 163px">
            <span style="font-size: 10pt; font-family: Verdana"><strong>
            Select file to upload:</strong></span></td>
        <td style="width: 324px">
            <asp:FileUpload ID="fUpload" runat="server" />&nbsp;<asp:Button ID="btnAdd" runat="server" Text="Add"
              OnClick="btnAdd_Click" /></td>
    </tr>
    <tr>
        <td style="width: 163px">
        </td>
        <td style="width: 324px">
            <asp:ListBox ID="lstFiles" runat="server" Width="324px"></asp:ListBox>
            </td>
    </tr>
    <tr>
        <td style="width: 163px">
        </td>
        <td style="width: 324px">
            <asp:Button ID="btnRemove" runat="server" Text="Remove" OnClick="btnRemove_Click" />
            &nbsp;<asp:Button ID="btnUpload" runat="server" Text="Upload"/></td>
    </tr>
    <tr>
        <td colspan="2">
            <asp:Label ID="lblMessage" runat="server" Font-Names="Verdana" Font-Size="Small"
              ForeColor="Red"></asp:Label></td>
    </tr>
</table> 

MyUploader codebehind:

public partial class MyUploader : System.Web.UI.UserControl
{

    protected static ArrayList arrFiles = new ArrayList(); // has to be static since Adding and then reusing

    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void btnAdd_Click(object sender, EventArgs e)
    {
        try
        {
            if (Page.IsPostBack)
            {
                arrFiles.Add(fUpload);
                lstFiles.Items.Add(fUpload.PostedFile.FileName);
            }
        }
        catch (Exception ex)
        {
            lblMessage.Text = "An error has occured while adding file" + ex.Message;
        }
    }

    protected void btnRemove_Click(object sender, EventArgs e)
    {
        if (lstFiles.Items.Count != 0)
        {
            arrFiles.Remove(fUpload);
            lstFiles.Items.Remove(lstFiles.SelectedItem.Text);
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:04:25+00:00Added an answer on May 14, 2026 at 7:04 pm

    I’m guessing your ASP.NET Bulk Uploader control works by doing a postback to the server, which refreshes the page. When the page reloads, the popup is in its default faded-out state.

    There might be a property of the Bulk Uploader named something like “AutoSubmit” that you can set to False and then later submit all the user’s file choices in bulk.

    Or, you can make the uploader’s server-side event handler put some data into the page HTML which the client JS can read, and then the client JS can figure out that if the page was reloaded due to an upload, then fade the dialog back in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 489k
  • Answers 489k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Add the "/g" global indicator to your regular expression: html… May 16, 2026 at 9:01 am
  • Editorial Team
    Editorial Team added an answer The best approach here is to split the code bit… May 16, 2026 at 9:01 am
  • Editorial Team
    Editorial Team added an answer I'd either use the constructor, or maybe a factory method,… May 16, 2026 at 9:01 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a basic page layout, and wanted to arrange information in columns. I
I have a page which basically allows an admin user to create manager user
I have an ASP.Net web page, which uses a Master Page template. The page
I've got a page which will have about ten drop down lists which are
on my website I have an Enroll page where users submit some basic information,
In my ASP.NET MVC app, I have a fairly complex edit page which combines
I have an ASP.NET website, on the masterpage I have a basic navigation menu:
This sounds like a why would you do that? sort of question, but here
I'm trying to wrap my head around the proper architecture for a demo app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.