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

  • Home
  • SEARCH
  • 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 9163351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:25:35+00:00 2026-06-17T14:25:35+00:00

I am making an AJAX call with jQuery: var topic = new Array(); $(‘.container-topico’).each(function

  • 0

I am making an AJAX call with jQuery:

        var topic = new Array();

        $('.container-topico').each(function (i) {
            topic.push(
            {
                "TopicsModel":
            {
                begins: $(this).find('.HoursStart').val(),
                ends: $(this).find('.HoursEnd').val(),
                texts: $(this).find('.input-topic').val()
            }
            }
                );
        });

        var data = JSON.stringify({
            videoId: '<%=Url.RequestContext.RouteData.Values["id"]%>',
            topics: topic
        });

        $.ajax({
            type: 'POST',
            contentType: 'application/json; charset=utf-8',
            url: '<%= Url.Action("SubmitTopics") %>',
            traditional: true,
            data:
            data
        ,

            beforeSend: function (XMLHttpRequest) {
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
            },
            success: function (data, textStatus, XMLHttpRequest) {
                $(data).each(function () {
                });
            }
        });

It is sending the JSON in the format (e.g):

{"videoId":"1","topics":


[{"TopicsModel": {"begins":"00:00:33","ends":"00:01:00","texts":"1. Primeiro tema"}},
    {"TopicsModel": {"begins":"00:01:00","ends":"00:01:33","texts":"2. Segundo tema"}},    
    {"TopicsModel": {"begins":"00:01:33","ends":"00:02:00","texts":"3. Terceiro tema"}},
    {"TopicsModel": {"begins":"00:02:00","ends":"00:00:21","texts":"dasdasdsa ada as das s"}},
    {"TopicsModel": {"begins":"0","ends":"0","texts":""}}]}

And on the server side it has the Model:

 public class TopicsModel
    {
        public string begins;
        public string ends;
        public string texts;
    }

and the Controller:

public ActionResult SubmitTopics(int videoId, List<TopicsModel> topics)

What happen is:

It have the correct number of objects, but is not binding the properties of each element, as you can see bellow:

It have the correct number of objects, but is not binding the properties

Why is it not binding to the properties ?

  • 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-17T14:25:36+00:00Added an answer on June 17, 2026 at 2:25 pm

    The binding can’t find the TopicsModel property in your TopicsModel object, so it can’t bind the value.

    Try this instead :

    {"videoId":"1","topics":
    
    
    [{"begins":"00:00:33","ends":"00:01:00","texts":"1. Primeiro tema"},
        {"begins":"00:01:00","ends":"00:01:33","texts":"2. Segundo tema"},    
        {"begins":"00:01:33","ends":"00:02:00","texts":"3. Terceiro tema"},
        {"begins":"00:02:00","ends":"00:00:21","texts":"dasdasdsa ada as das s"},
        {"begins":"0","ends":"0","texts":""}]}
    

    The binding should then resume normally.


    You also have to change your model this way :

    public class TopicsModel
        {
            public string begins { get; set; }
            public string ends { get; set; }
            public string texts { get; set; }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making ajax call like this $(document).ready(function() { var abc = new Array();
I am making an ajax call in jquery $.get(validate_isbn.php, {isbn: obj[16]}, function(answer) { console.log(answer);
I am using jquery-ui autocomplete and making a ajax call inside the autocomplete function
i am using jquery-ui auto-complete and making a ajax call inside the auto-complete function
I am making an AJAX call using jQuery to an .ascx control's method in
I am using Rails and jQuery, making an ajax call initiated by clicking a
i am trying to make a ajax call by making use of jquery UI
I'm making an AJAX call with JQuery and sending up JSON from an MVC
//Prepare ‘Account’ object and call create function function createAccount() { var new_nit = new
I'm successfully making an AJAX call with the Jquery $.ajax method, in that the

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.