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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:00:35+00:00 2026-06-03T08:00:35+00:00

Having some odd behavior I’d love some feed back on as I can’t seem

  • 0

Having some odd behavior I’d love some feed back on as I can’t seem to find any details on this sort of thing anywhere…

Setup:
Using ASP.NET MVC 4 and VS 2010, I have created a corporate directory application with a search page and a details page that displays a corporate tree based on the search selection.

The search page is very basic and using ajax.beginform it returns a list of people back based on the criteria selected. After clicking on the person you get a “tree” showing that individual, their supervisor and any subordinates.

Problem
The user searches for someone, clicks on their result, sees the tree. When they click the back button (with or without performing any other action on the tree view) they are returned to the search screen. The criteria they entered is there but the results are not (as I would expect). If they click search or hit the enter key, the user then receives a 404 page not found error…

What I’ve Tried
From the things I’ve read, I’ve been focusing on possible solutions revolving around the cache, I’ve tried expiring the page or setting the page for no-cache but that has not seemed to resolve the issue.

CODE

Search View:

@using (Ajax.BeginForm("PersonList", "Home", new AjaxOptions { UpdateTargetId = "results", InsertionMode=InsertionMode.Replace }))
{

        @Html.LabelFor(model => model.LastName)
        @Html.TextBoxFor(model => model.LastName)<br />

        @Html.LabelFor(model => model.FirstName)
        @Html.TextBoxFor(model => model.FirstName)<br />

        <input type="submit" value="Search" />

        <div id="results">
        </div>
}

Block that gets plopped in for the search results. This is a partial view that is reused for the tree view as well. That is why you’ll see that the link at the top of the block is in a conditional. If the link is to be used from the search page, it’s an html link that forces a full page change. If you’re already on the tree view though, navigation is done via ajax. The 404 error I’m receiving occurs without navigating at all on the tree view page:

<div id="p@{ Html.DisplayFor(model => model.Id); }" class="personCard">
    <img class="personImg" id="img@{ Html.DisplayFor(model => model.Id); }" src="@Url.Content("~/Photos")/@Html.DisplayFor(model => model.Id)" />
    <div>
        @if(ViewBag.IsForSearch == null) {
            @Ajax.ActionLink(this.Model.FullName, "PersonHierarchy", new { id = this.Model.Id }, new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "tree" })
        } else {
            @Html.ActionLink(this.Model.FullName, "Person", new { id = this.Model.Id })
        }
        @if(this.Model.TeamSize > 0) {
            @:&nbsp;(
            @Html.DisplayFor(model => model.TeamSize)
            @:)
        }
        <br />
        @Html.DisplayFor(model => model.Title)<br />
        @Html.DisplayFor(model => model.MailLocationCode), @Html.DisplayFor(model => model.WorkNumber) &nbsp;&nbsp; @Html.DisplayFor(model => model.ExtensionForDisplay)<br />
        @if (this.Model.CellNumber.Trim() != string.Empty)
        {
            @:Cell:
            @Html.DisplayFor(model => model.CellNumber)
            @:<br />
        }
        @Html.DisplayFor(model => model.EmailAddress)
    </div>
</div>

Response from Server:

Server Error in ‘/’ Application.

The resource cannot be found. Description: HTTP 404. The resource you
are looking for (or one of its dependencies) could have been removed,
had its name changed, or is temporarily unavailable. Please review
the following URL and make sure that it is spelled correctly.

Requested URL: /

——————————————————————————– Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.272

EDIT:
This appears to be specific to IE 9 (in all modes). This behavior does not happen in Chrome and the search form resubmits perfectly after using the back button…

  • 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-03T08:00:36+00:00Added an answer on June 3, 2026 at 8:00 am

    OK…I seem to have found the answer:

    To recap, specifically in IE 9 when using ASP.NET MVC Ajax, using the back button to navigate back to a page that has a ajax form on it and trying to submit that form results in a 404 error.

    I initially looked into various cache solutions to try to force IE to realize that the page needed to be “reloaded” (even though Chrome and other browsers had no issue with making the form work again when using the back button). This apparently was the correct path to go down but unfortunately I didn’t get far enough. The solution ends up being setting the OutputCache for the controller action (or to the entire controller) to:

    [OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
    

    Adding that annotation to the action in the controller or to the controller class as a whole resolved the problem…thanks IE…

    For further information on this, I refer to my source:
    http://dougwilsonsa.wordpress.com/2011/04/29/disabling-ie9-ajax-response-caching-asp-net-mvc-3-jquery/

    Thanks to everyone who tried to help.

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

Sidebar

Related Questions

I'm having really odd behavior with Rails, and I can't seem to figure out
I am having an odd error in my shell script. using this: $find /sys/class/
I have audio constantly playing during my application. I am having some odd behavior
I seem to be having some extremely odd cache_money interactions. When I am on
I am trying to debug a web app, and am having some rather odd
I'm attempting to do something very odd, and I'm having some luck, but am
I'm having an odd problem, I can't get an object from the DB and
I've been having some odd problems with permission in Android. I am trying to
I've been having an issue getting .getScript to work in some odd cases. For
I'm having some odd and intermittent errors, which I assume are related to my

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.