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 5991869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:27:01+00:00 2026-05-22T23:27:01+00:00

I am using an AJAX Toolkit AsyncFileUpload as follows… <p> <asp:Label runat=server Text=Choose a

  • 0

I am using an AJAX Toolkit AsyncFileUpload as follows…

        <p>
            <asp:Label runat="server" Text="Choose a webstock file to upload..." ID="uploadResult" />
            <asp:Button ID="btnImport" Text="Import Data to Website &raquo;" OnClick="importData" runat="server" Visible="false" />
        </p>
        <asp:AsyncFileUpload  ID="afuStockImport"  runat="server" 
                OnUploadedComplete="uploadComplete"               
                OnClientUploadError="uploadError" 
                OnClientUploadStarted="StartUpload" 
                OnClientUploadComplete="UploadComplete" 
                Width="400px" 
                UploaderStyle="modern"   
                UploadingBackColor="#b9b9b9" 
                CompleteBackColor="#00FF00"
                ErrorBackColor="#FF0000"
                ThrobberID="myThrobber" 
                ClientIDMode="AutoID"/>
        &nbsp;       
        <asp:Label runat="server" ID="myThrobber" style="display:none;" >  
            <img align="absmiddle" alt="" src="adminimages/uploading.gif" />  
        </asp:Label>  

I am trying to access the btnImport control to make it visible on success of upload, but accessing it from the uploadComplete procedure in the code behind does nothing….

        protected void uploadComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
    {
        try
        {
            //upload file to web file system
            System.Threading.Thread.Sleep(5000);
            if (afuStockImport.HasFile)
            {
                string strPath = Server.MapPath("~/admin/stockfiles/") + Path.GetFileName(afuStockImport.PostedFile.FileName);
                afuStockImport.SaveAs(strPath);
                btnImport.Visible = true;
            }
        }
        catch (Exception ulEx)
        {
            //Error message
        }
    }

Any help would be appreciated.

Cheers,
Ben

  • 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-22T23:27:01+00:00Added an answer on May 22, 2026 at 11:27 pm

    Actually you can access that button but your changes don’t applied as the uploadComplete method executed asynchronously.
    in my opinion its better to hide the btnImport using style=”display: none;”, handle client-side OnClientUploadComplete event of the AsyncFileUpload and show button after file was uploaded successfully.

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

Sidebar

Related Questions

I am using ajax toolkit asyncFileUpload control I had problem that my server side
I'm using an AsyncFileUpload (AJAX Toolkit) to upload images. I have a Button which
I am using the AsyncFileUpload control provided by the Ajax Toolkit. I am needing
Can you do ajax on ASP.net webform without using ajax toolkit? (Please post a
I have an ASP.NET page using the AJAX control toolkit for some controls. A
I'm using the ASP net Ajax toolkit and have a GridView within the UpdatePanel
I am using the ASP.NET AJAX Control Toolkit. Within this toolkit, I am only
I've been using the ASP.NET Ajax Control Toolkit Slideshow extender and while it works,
Here's the specs: ASP.NET 3.5 using ASP.NET AJAX AJAX Control Toolkit jQuery 1.3.2 web
I am using ASP.net 3.5 and Ajax toolkit is 2.0. Following is my code

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.