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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:29:52+00:00 2026-06-14T09:29:52+00:00

I created an interface to pull data, there are a few simple steps. Users

  • 0

I created an interface to pull data, there are a few simple steps.

Users select their desired data from drop boxes, they click a “Check Available” button, and if there are records available, a “Send Request” button shows.

After clicking the send request button, SQL tables are sent to an excel file, the file is slightly massaged with vba, then the user is emailed from C# with a link to this excel file.

The issue I’m facing is that the users get impatient after one or two seconds and start mashing the “send Request” button over and over again. This impatience crashes the application.

How could I make the page behave so that after clicking “Send Request”, the page is refreshed but the process is still carried out over the server and the email is still sent from C#.

public void SendRequest_Click(object sender, EventArgs e)
{    
    //Insert amazing line of code that refreshes the web form but does everything beyond this line

    SendRequest.Visible = false;
    //Creating a new class
    QueryMule mule = new QueryMule();
    Label11.Visible = true;
    string myfilename = Label3.Text;
    string splitusernum = Label4.Text;
    string dtablenum = Label4.Text;
    string exportnum = Label4.Text;
    //Export all export tables to mercuryexport excel file
    mule.SQLExport(18, splitusernum, exportnum);
    //Creating a new excel application to open the mercury template and run its macro
    ExcelApp.Application appExl;
    ExcelApp.Workbook workbook;
    ExcelApp.Worksheet newSheet;
    ExcelApp.Range Range;
    appExl = new ExcelApp.Application();

    RegionName.SelectedItem.Value + timestampeddone + ".xlsm";

    workbook = appExl.Workbooks.Open(@"filepath", Missing.Value,
        Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, 
        Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
        Missing.Value, Missing.Value, Missing.Value);

    appExl.Visible = true;
    appExl.DisplayAlerts = true;

    System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
    message.To.Add '''REMOVED EMAIL ADDRESS
    message.Subject = "Delivery System";
    message.From '''REMOVED EMAIL ADDRESS
    message.Body = "filepath" + myfilename;
    System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("mailhost");
    smtp.Send(message);

    Label4.Text = "Email Sent";

    mule.DropTable(dtablenum);
    mule.DropTable1(dtablenum);
    mule.DropTable2(dtablenum);
    mule.DropExportTable(dtablenum);
}
  • 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-06-14T09:29:53+00:00Added an answer on June 14, 2026 at 9:29 am

    You’d need to spin off a background worker thread to create the excel file. The request would then respond immediately with a friendly message indicating that they will be emailed the link when it is ready.

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

Sidebar

Related Questions

I'm creating a uitableview with custom cells which I created in Interface Builder. There
I've created a Gridview control that pulls some data from my database, but doesn't
We have an old Access 2000 database that we need to pull data from
I have created an interface with ServiceContract on interface and OperationContract on all its
I have a Tab Bar Controller created in Interface Builder Within the Tab Bar
I have a ViewController and UIWebView created in Interface Builder in it. I fill
I'm using a UITableView to display custom cells created with Interface Builder. The table
Here's the story. I created an interface, IVehicle . I explicitly implemented the interface
I created the following interface: <?php interface Action { public function execute(\requests\Request $request, array
I created a marker interface: public interface ISupportAJAXPostsBacks{} I added it to my Page..

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.