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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:43:04+00:00 2026-06-03T03:43:04+00:00

[HttpPost] public ActionResult accountchange(int id, int accountid, bool activate) { // Operations return Json(new

  • 0
    [HttpPost]
    public ActionResult accountchange(int id, int accountid, bool activate)
    {
        // Operations
        return Json(new { Model = model, Result = true, Message = "Changed Successfully });
    }

    $('#accountchange-button').click(function () {
        alert("");
        $.post("url/accountchange/", {id:1, accountid:1, activate:1},
            function (data) { $('.result').html(data); }, "json");

    });

always got:

POST http://localhost/account/accountchange/ 500 (Internal Server Error)
                f.support.ajax.f.ajaxTransport.sendjquery.min.js:4
                f.extend.ajaxjquery.min.js:4
                f.each.f.(anonymous function)jquery.min.js:4
                (anonymous function)demo:105
                f.event.dispatchjquery.min.js:3
                f.event.add.h.handle.i

any idea?

  • 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-03T03:43:05+00:00Added an answer on June 3, 2026 at 3:43 am

    In your code, I don’t see model being defined. That’s my best guess as to why your application is returning a 500 application error. As previously mentioned in the comment, you can use the inspect element utility to figure out what the server is actually complaining about.

    [HttpPost]
    public ActionResult accountchange(int id, int accountid, bool activate)
    {
        // Model = model is most likely undefined
        return Json(new { Model = model, Result = true, Message = "Changed Successfully });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this action method: [HttpPost] public ActionResult GetNextImage(int m_id) { ... return Json(new{...});
i have 2 actions public ActionResult FilesAdd(int id) { FillParentMenuDDL(id); return View(); } [HttpPost]
// // Post: /Search/Alternativ1/txtBoxTitle) [HttpPost] public ActionResult Alternativ1(int txtBoxTitle) { SokningMedAlternativ1 test= new SokningMedAlternativ1();
Controller public ActionResult Create() { return View(new PageViewModel()); } [HttpPost] public ActionResult Create(Page page)
[HttpPost] public ActionResult Login(LoginModel model) { if (ModelState.IsValid) { Authenticate(model.Username, model.Password); return RedirectToAction(Index); }
I have a controller method [HttpPost] public ActionResult GetUserData() { return Json(GetCurrentUser()); } I'm
I have Controller: [MySite]\Controllers\DistributionTools\TrackingChannelsController.cs [HttpPost] public void InitTcFirstPageView() { var model = new TcFirstPageModel
[HttpPost] public ActionResult AddImage(Image model) { if (model.ImageData != null && model.ImageData.ContentLength > 0)
I have an action : [HttpPost] public ActionResult MyAction(MyModel model) { ... if (model.MyCondition
Suppose you have the following controller action [HttpPost] public ActionResult Save( CustomerModel model )

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.