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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:03:06+00:00 2026-06-14T06:03:06+00:00

I have a very standard layout for an ajax.beginform with a callback on OnSuccess.

  • 0

I have a very standard layout for an ajax.beginform with a callback on OnSuccess. But in IE8, the callback does not get called, but it works fine in Chrome.

I am including jquery.validate.min.js, jquery.validate.unobstusive.min.js, and jquery.unobstrusive-ajax.min.js in my view.

The view is used as a partial view, and contains all the scripts it needs, as well as the javascript function that the callback will call.

I will also note, that I had to upgrade my jquery.validate.min.js that came with the initial creation of the MVC3 project to one that would work properly with IE8 already.

Are there any known issues with why this would not work? Or am I missing something?

[cshtml]

<script type="text/javascript">
    function FormSuccess(context) {
        alert("FormSuccess()");
    };
</script>

@using (Ajax.BeginForm("GetMessage", "Form", new AjaxOptions { OnSuccess = "FormSuccess" }))
{

[Controller]

[HttpPost]
public JsonResult GetMessage(MessageModel model)
{
    return Json( success = true, message = "success" );
}

In Chrome, the callback is hit, but in IE8 I get a file download dialog. When the file is downloaded, I get a file containing the following:

{"success":false,"messages":"success"}

As you can see, it is a very simple thing I am doing here, but it just does not seem to want to work in IE8.

Any ideas?

UPDATE

I found out that because I am rendering a razor cshtml file form an ascx page, the AjaxOptions callbacks are not being called. I created a sandbox app that does the same thing, and if I have a cshtml render a partial cshtml, everything works fine, but if I have a aspx render a partial cshtml, the callbacks do not get called

  • 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-14T06:03:07+00:00Added an answer on June 14, 2026 at 6:03 am

    following is incorrect

    [HttpPost]
    public JsonResult GetMessage(MessageModel model)
    {
        return Json( success = true, message = "success" );
    }
    

    .change it to :

      [HttpPost]
        public JsonResult GetMessage(MessageModel model)
        {
    
            return new JsonResult{success = true, message = "success"};
        }
    

    EDIT:

    you have to return a complete View instead of json result.

    if you want to sent ajax request and get JSON result you must send it via jquery ajax function.

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

Sidebar

Related Questions

I have a (very simple and standard) UPDATE statement which works fine either directly
I have very little experience using Sharepoint but a good amount using Visual Studio
I have a very standard CRUD app in Rails & Jquery Mobile with two
In knockout.js I have a very standard field that looks like this: <label data-bind=text:
Say I have very standard mysql connection code: $dbhost = '192.168.1.99'; $dbuser = 'dbuser';
I have a very standard BroadcastReceiver to intercept outgoing calls. I'd like to give
I have a very simple and standard PHP force download script. How do I
I have a very basic program which displays a standard Textview and a extended
This is a very simple question, but embarrassingly enough I am not sure how
I have a very standard app backed by an SQL database with a User

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.