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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:34:37+00:00 2026-06-06T14:34:37+00:00

I have a ASP.NET MVC application and I have a few entries on the

  • 0

I have a ASP.NET MVC application and I have a few entries on the page that user can change and click Save and I go save those entries. My problem: It works fine for some entries and for other entries it just doesn’t go in the controller Save function to do the save.
My code:

 function DoSave() {
         $("#pisave").attr("disabled", true);
         var pid = $("#personid").val();alert(pid);
         var firstname = $("#fname").val();alert(firstname);
         var lastname = $("#lastname").val();alert(lastname);
         var plz = $("#zip").val();alert(plz);
         var ort = $("#city").val();alert(ort);
         var bday = $("#birthdate").val();alert(bday);
         var strasse = $("#street1").val(); alert(strasse);
         var emailtext = $("#email").val();alert(emailtext);
         var url = "@(Url.Action("SavePersonInfo", "Info"))";alert("URL");
        $.ajax({
            url: url,
            data: { personid: pid,fn: firstname, ln: lastname, email: emailtext, zip: plz, city:ort, birthday: bday, street:strasse },
            success: function () {                    
            alert("Update Successful");
            $("#pisave").removeAttr("disabled");
            },
           error: function () {                    
              alert("Update Failed! Check entries.");
             $("#pisave").removeAttr("disabled");
            }
        });
    }  

All alerts are displayed in all the cases. Only for some it goes to SavePersonInfo and for others it doesn’t go in there. Any ideas what might be wrong?? Can it be validation issue for the entries?

  • 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-06T14:34:38+00:00Added an answer on June 6, 2026 at 2:34 pm

    The model binder fails to parse your date, change to post:

    $.ajax({
        type: "POST",
        url: url,
        data: { personid: pid,fn: firstname, ln: lastname, email: emailtext, zip: plz, city:ort, birthday: bday, street:strasse },
        success: function() {
            alert("Update Successful");
            $("#pisave").removeAttr("disabled");
        },
        error: function() {
            alert("Update Failed! Check entries.");
            $("#pisave").removeAttr("disabled");
        }
    });​
    

    Read more about the problems with dates in asp.net-MVC

    Note that you can add all the elements a class and use the serialize function:

    $.ajax({
        type: "POST",
        url: url,
        data: $('.theClass').serialize(), // <=============
        success: function() {
            alert("Update Successful");
            $("#pisave").removeAttr("disabled");
        },
        error: function() {
            alert("Update Failed! Check entries.");
            $("#pisave").removeAttr("disabled");
        }
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC application that uses Fluent NHibernate and AutoMapper. I am
I have an Asp.Net MVC application that works in the vs.net development web server.
I have a ASP.NET MVC application that runs in both IIS 6 and 7.
We have an asp.net mvc application that we would like to integrate a FileSystemWatcher
I'm using windows authentication in my ASP.net MVC 3 application. I have a few
I have an Asp.Net MVC Web Application that I am developing. I have TeamCity
I have an ASP.NET MVC 3 (Razor) Web Application, with a particular page which
I have an ASP.NET MVC application with quite a few drop-down lists and multi-select
I have an ASP.NET MVC application that uses LINQ2SQL as the database layer. I
I have developed a set of apis that live on an asp.net mvc application,

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.