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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:59:29+00:00 2026-05-16T06:59:29+00:00

What I am trying to do is render a View in an MVC site

  • 0

What I am trying to do is render a View in an MVC site informing the user to not refresh their browser while server side processing is taking place. This could be a long running task, and if they hit refresh it will send the request again, thus sending them to the error screen when the process was actually successful. I was going to do this in JS, either with JQuery $.ajax(…) or with a simple $(document).ready(function() { window.location = … }); but I was hoping there was a way to do it in MVC, thus giving me more control over the HttpResponseCode which is returned to the client calling. Is there a way to do this?

I was thinking along the lines of

    public ActionResult LoadingAsync(string UserKey, string userInf)
    {
        AsyncManager.OutstandingOperations.Increment();

        CallProcess(...)

        return View();
    }

then have a Completed Action perform the redirect

   public ActionResult LoadingCompleted()
    {
        LongRunningProcess();
        return Redirect("http://yourdone.com");
    }

or just have something that Renders inside the view that will perform the Redirect from inside the View

    <% Html.RenderAction("Process"); %><!--This won't actually redirect-->

Any ideas?

  • 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-16T06:59:30+00:00Added an answer on May 16, 2026 at 6:59 am

    There is no way to achieve this without invoking some kind of Javascript on the client.

    When you return a response to the user, you either return a page to display with an HTTP code of 200 (OK), or an instruction to redirect with an HTTP code of 301 (Moved Permanently) or 307 (Moved Temporarily) and a URL to redirect to.

    You have to choose either of these return values and cannot return both.

    The simplest solution is to use Javascript to redirect the user from your “please wait” page to the destination once it determines the background process has completed.

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

Sidebar

Related Questions

I am trying to render a user control into a string. The application is
I'm trying to wrap content with some static HTML in MVC and I'm not
I am trying to render a model in Direct3D using DrawIndexedPrimitives . However, I
I'm trying to render a bit of text using Core Graphics APIs and I'm
I have a chart (in bitmap format) that I'm trying to render to a
I am trying to get the DataGridView to render the insert new row row
I am trying to come up with the best way to render some hierarchical
I'm trying to write a C++ windows service that can render to a texture.
I'm trying to build a Chrome browser extension, that should enhance the way the
I have an asp.net mvc 3 site running locally and everything works fine. I

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.