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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:18:43+00:00 2026-05-26T19:18:43+00:00

With ASP.NET MVC3 (Razor) I have a simple page that loads a jQuery UI

  • 0

With ASP.NET MVC3 (Razor) I have a simple page that loads a jQuery UI dialog.

@{
    ViewBag.Title = "Home Page";
}
<h2>yo</h2>
<div id="fileUpload">
</div>
<button id="button2">
    Upload file
</button>
<script type="text/javascript">
    $(document).ready(function () {
        $('#button2').click(function () {
            $fileUpload = $('#fileUpload');
            $fileUpload.dialog({
                minWidth: 500,
                minHeight: 100,
                title: 'Upload File(s)',
                autoOpen: true,
                buttons: {
                    'Upload': function () {
                        $('form').submit();
                    },
                    'Cancel': function () {
                        $(this).dialog('close');
                    }
                },
                open: function (event, ui) {
                    $(this).load('@Url.Action(MVC.FileUpload.FileUpload())');
                },
                close: function (event, ui) {
                    $(this).dialog('destroy');
                    //$(this).remove();
                },
                dialogClass: 'no-close',
                closeText: '',
                modal: true
            });
        });
    });
</script>

Notice on open() the form makes a call to a controller method. It returns a PartialView and looks like this…

public virtual ActionResult FileUpload() { return new
PartialViewResult(); }

The problem I am having is IE is caching the call to the partial view. If I update the partial view then it does not load until I clear the browser cache.

I have tried the ‘destroy’ method on close() as well as .remove(). Neither have an effect. I have also confirmed open() is called each time #button2 is clicked.

Any ideas on how to keep the dialog contents from getting cached?

  • 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-26T19:18:44+00:00Added an answer on May 26, 2026 at 7:18 pm

    You can add this to your global js code to prevent IE from ever caching ajax request:

    $.ajaxSetup({ cache: false });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ASP.NET 1.1 - I have a DataGrid on an ASPX page that is databound
I have a string created using asp.net MVC3 Razor block like this: @{ var
I have online form builder appplication in ASP.NET MVC3 with Razor views. It is
I have an href in my asp.net MVC3 Razor view and I want to
Here's the issue at hand: I have developed an ASP.NET MVC3 application using Razor.
I am working on a project which adopted ASP.NET MVC3(Razor) tech. Now, I have
I have an ASP.NET MVC 3 (Razor) Web Application, with a particular page which
I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that
I'm building a form in ASP.NET MVC3 + Razor that posts to a PHP
In my asp.net mvc3 (razor) project I have a grid very similar to the

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.