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

  • Home
  • SEARCH
  • 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 7165647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:17:03+00:00 2026-05-28T14:17:03+00:00

My controller action is being executed twice. Fiddler shows two requests and responses, and

  • 0

My controller action is being executed twice. Fiddler shows two requests and responses, and for the first one has an icon that indicates “Session was aborted by the client, Fiddler, or the Server.”

But I can’t figure out where this is happening, or why.

Here are the specifics:

I have a section of a view (ThingFinancials) that looks like this:

@{ using (Html.BeginForm("ConfirmThing", "Thing", null, FormMethod.Get, new { id = "frmGo" }))
   {
       @Html.HiddenFor(model => model.ThingID)
    <button id="btnGo">
        Thing is a Go - Notify People</button>
   }
}

The javascript for btnGo looks like this:

    $("#btnGo").click(function () {
        var form = $("#frmGo");
        form.submit();
    });

The action (stripped down) looks like this:

   public ActionResult ConfirmThing(int thingID)
   {
        [do some database stuff]
        [send some emails]

        var financials = GetFinancials(thingID);
        return View("ThingFinancials", financials);
   }

The only thing that looks unusual to me is that the URL you’d see would start out as [Website]/Thing/ThingFinancials/47, and after submission the URL would be [Website]/Thing/ConfirmThing?ThingID=47.

(If you’re wondering why the Action name doesn’t match the View name, it’s because there are multiple form tags on ThingFinancials, and they can’t all have the same action name.)

Is there a Server.Transfer happening behind the scenes, or something like that?

  • 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-28T14:17:04+00:00Added an answer on May 28, 2026 at 2:17 pm

    If you are using a submit button then you need to cancel the default behaviour when submitting with javascript, otherwise you will submit it twice. Try this:

     $("#btnGo").click(function () {
            var form = $("#frmGo");
            // event.preventDefault(); doesn't work in IE8 so do the following instead
            (event.preventDefault) ? event.preventDefault() : event.returnValue = false;
            form.submit();
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a controller action that is being executed by a link that was
I have a specific controller action that is being called twice, which aside from
I am trying to secure a controller action that is being called with the
I have a controller action that checks this.User.Identity.IsAuthenticated What do you suggest how to
Can a ASP .NET Controller action method take an interface as one of the
If i have a Controller Action that may recieve both HTTP GET and HTTP
How can I get the controller action (method) and controller type that will be
Is there any easy way to distinguish between an ASP.NET MVC controller action being
Is there an event that is fired prior to an action method being called
A simple controller action that is posted to which takes a model used by

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.