burnsdonkey
New Member
I am retruning a string from the webmethod that is a table. The success method on the $.ajax is hit but does not insert the retruned result into the specified element. \[code\] success: function(result){ $('#divSubjectQuestions').html(result); },\[/code\]when I insert some string of html then it is rendered but this code is not working. Edit:\[code\] int SubjectId = Convert.ToInt32(sSubjectId); DataTable QuestionsTable = QuestionDataAccess.RetrieveSubjectQuestion(SubjectId); string head = "<table class='gridstyle' cellspacing='0' rules='all' border='1' style='border-collapse:collapse;width: 100%;'><tr class='headerclass'><th scope='col'>Subject l Questions</th></tr>"; string body = ""; foreach (DataRow row in QuestionsTable.Rows) { body += " <tr><td> <a href='http://stackoverflow.com/questions/12684246/QuestionDisplay.aspx?Id=" + row.ItemArray.GetValue(1) + "'style='font-size:Small;text-decoration:none;'>" + row.ItemArray.GetValue(0) + "</a><br /><span style='font-size:XX-Small;'>" + row.ItemArray.GetValue(2) + "</span> <span style='color:Gray;font-size:XX-Small;'>Boosts" + row.ItemArray.GetValue(5) + "</span> <span style='font-size:XX-Small;'>" + row.ItemArray.GetValue(4) + "</span> <span style='font-size:XX-Small;'>" + row.ItemArray.GetValue(3) + "</span> <span style='font-size:XX-Small;'>" + row.ItemArray.GetValue(6) + "</span></td></tr>"; } // return head + body + "</table>"; return "<p>boom!</b>";\[/code\]