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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:12:59+00:00 2026-05-15T20:12:59+00:00

I am trying to debug a problem wherein RedirectToAction appears to be working properly

  • 0

I am trying to debug a problem wherein RedirectToAction appears to be working properly (i.e., the redirected-to Action is executed) but the specified View is never rendered on the client side and the url is not rewritten. My question is really where can I be looking to debug this? Here’s the code:

Form:

<%using (Html.BeginForm("Save", "Items", FormMethod.Post, new {id="ItemForm"})) {%>
  <%=Html.AntiForgeryToken()%>
   ..form contents elided...
       <%= Html.Button("btnSave", ViewData.Model.SaveMethod, HtmlButtonType.Submit) %>
       <%= Html.Button("btnCancel", "Cancel", HtmlButtonType.Button, 
                                "window.location.href = '" +      Html.BuildUrlFromExpressionForAreas<ItemsController>(c => c.Index()) + "';") %>     
<% } %>

Controller:

    [ValidateAntiForgeryToken]
    [Transaction]
    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult Save(Item item)
    {
        if (item.Id == Guid.Empty)
            return Create(item);

        return Edit(item);
    }

    [ValidateAntiForgeryToken]
    [Transaction]
    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult Edit(Item item)
    {
        if (ViewData.ModelState.IsValid)
        {
            ActionConfirmation updateConfirmation =
                _itemManagementService.UpdateWith(item, item.Id);

            if (updateConfirmation.WasSuccessful)
            {
                TempData[ControllerEnums.GlobalViewDataProperty.PageMessage.ToString()] =
                    updateConfirmation.Message;
                return RedirectToAction("Index");
            }
        }

        ItemFormViewModel viewModel =
            _itemManagementService.CreateFormViewModelFor(item, _indicatorManagementService, _strategyManagementService);
        return View(viewModel);
    }

    [Transaction]
    public ActionResult Index()
    {
        ItemsFormViewModel viewModel = _itemManagementService.CreateListFormViewModel(_indicatorManagementService,
                                                                                      _strategyManagementService);
        return View(viewModel);
    }

I am using a custom model binder, but model.IsValid returns true and the changes to the model save successfully. I am at a loss as to where to look to track this down.

Thanks for looking.

  • 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-15T20:13:00+00:00Added an answer on May 15, 2026 at 8:13 pm

    As always, as soon as I post, I finally figure it out. Had some left over jquery from a previous approach that was hijacking the submit.

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

Sidebar

Related Questions

I am trying to debug a problem where a user clicks on the button
I’m trying to debug a memory leak problem. I’m using mtrace() to get a
I'm still trying to debug a very sneaky memory corruption problem. I came across
The problem: I am trying to debug some focus-related problems in my Java Swing
I'm trying to debug a problem with a perl application that calls some c
I'm trying to debug a problem (exception being thrown) in an ASP.NET MVC program
I am trying to debug a problem with a .net compact framework application I
I am trying to debug a problem where HtmlHelper is null in extension methods.
I'm trying to debug a problem in a DLL written in C that keeps
I am trying to debug a problem where my widget becomes invalid and a

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.