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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:21:53+00:00 2026-06-14T13:21:53+00:00

I am working on a project where i need inline editing for controls. and

  • 0

I am working on a project where i need inline editing for controls. and i want to edit model’s properties using view and then want to send it to controller using jquery ajax. how can i send full model to controller using $.ajax()

My model is:

  public class LeadDetail
  {
    public int EntityID { get; set; }
    public string EntityName { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Email { get; set; }
    public int PhoneType { get; set; }
    public string PhoneNumber { get; set; }
    public string PhoneExt { get; set; }
    public string Address1 { get; set; }
    public string Address2 { get; set; }
    public string Address3 { get; set; }
    public string City { get; set; }
    public int State { get; set; }
    public string ZipCode { get; set; }
    public string Country { get; set; }
    public decimal Amount { get; set; }
    public string LeadAssignedToName { get; set; }
    public int RelatedAccount { get; set; }
    public string LeadStatusName { get; set; }
    public string LeadRatingName { get; set; }
    public string LeadSourceName { get; set; }
    public string CampaignName { get; set; }
    public int LeadType { get; set; }
    public string Url { get; set; }
    public string Comments { get; set; }
    public int Subscribed { get; set; }
    public string CreatedDate { get; set; }
    public string CreatedBy { get; set; }
    public string utm_source { get; set; }
    public string utm_term { get; set; }
    public string IPAddress { get; set; }
    public string utm_medium { get; set; }
    public string utm_campaign { get; set; }
    public string utm_content { get; set; }
    public int RelatedAccountId { get; set; }
    public int LeadTypeID { get; set; }
    public int CampaignID { get; set; }
    public string BirthDate { get; set; }
    public string SocialSecurity { get; set; }
    public string emailsubscriber { get; set; }
    public string active { get; set; }
    public int department { get; set; }
    public int Title { get; set; }
    public int PrimaryEmail { get; set; }
    public int PrimaryPhone { get; set; }
    public int PrimaryAddress { get; set; }
    public string LeadAssignedDate { get; set; }
    public int LeadRatingID { get; set; }
    public int LeadStatusID { get; set; }
    public int AccountType { get; set; }
    public int EntityTypeID { get; set; }
    public int LeadAssignedTo { get; set; }
    public int AccountStatusID { get; set; }
    public int LeadSourceID { get; set; }
    public string PrimaryContact { get; set; }
    public string stateName { get; set; }
}

and i have a method on controller:

[HttpPost]
    public void updateDetail(LeadDetail Lead)
    {
        LeadDetail leadvalue = Lead;
    }

I want correct way to send full model to controller

    $.ajax({
            url: '/Test/updateDetail',
            type: 'POST',
            data: {
                 Lead:'@Model'
            },

i get null in the method updateDetail after this ajax post how to improve it

  • 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-14T13:21:55+00:00Added an answer on June 14, 2026 at 1:21 pm
    Lead:'@Model'
    

    This is server code and it works only in *.cshtml files, if you look at rendered html markup you will find only object name.

    Try this:

        var form = $('#your_form');
        form.submit(function (e) {
            e.preventDefault();
            $.ajax({
                url: this.action,
                type: this.method,
                data: $(this).serialize(),
                success: function (data ){
    
                }
            });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a project and need to add an additional image using
I am working on project where I need to put different controls into one
Working on a project and need to generate pdf of the product details using
I'm working in a project that need to get SVD (Single Values Decomposition) for
I was working on a project and I need to read a row in
I am working on a project where I need to automate some workflows in
I am working on a project and I need to save user configuration. The
I am working on this project where I need to read in a lot
I'm working on a project where I need to get the total row count
I'm working on a project where I need to create a link that when

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.