My controller action is performed twice. Fiddler shows two requests and responses, and for the first, an icon that indicates: "The session was interrupted by the client, Fiddler or server."
But I canβt understand where this is happening, or why.
Here are the specifics:
I have a view section (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 (truncated) is as follows:
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 see will start as [Website]/Thing/ThingFinancials/47 , and after sending the URL will be [Website]/Thing/ConfirmThing?ThingID=47 .
(If you are wondering why the Action name does not match the View name, this is because ThingFinancials has multiple form tags and they cannot have the same action name.)
Is Server.Transfer going on behind the scenes or something like that?
source share