getJSON not getting data from database -


function find() {    var id = $('#id').val();    $.getjson("api/questionsanswer/" + id,    function (data)    {        var str = data.username + ': $ ' + data.questions;        $('#questionanswer').text(str);    })    .fail (        function (jqxhr, textstatus, err) {        $('#questionanswer').text('error: ' + err);     }); } 

i try data display "null: null" seems data.username , data.questions wasn't capture... wrong code??


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -