Note that there are some explanatory texts on larger screens.

plurals
  1. POPassing the HTML table to JSON via Server side causing error
    primarykey
    data
    text
    <p>I've a dynamically created HTML table in the Server side code(using C#). When i pass that to client site using JASON. I couldn't able to receive that code in the client site. this is my code in the Server Side.</p> <pre><code> $.ajax({ type: "POST", url: "ExcelUpload.asmx/UploadFile", data: JSON.stringify({ XML: XMLDoc}), contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $("#Status").html("&lt;br&gt;&lt;center&gt;&lt;img src='ajax-loader.gif'/&gt;&lt;/center&gt;"); }, success: function (result) { var output = ""; var re = eval('(' + result.d + ')'); if (re.length &gt; 0) { for (var i in re) { var xl = re[i]; switch (parseInt(xl.status)) { case 1: { output = xl.message; break; } case 2: { output = xl.message; break; } } } $("#Status").html(output); } }, error: function (result) { $("#Status").addClass("error"); $("#Status").html(result.d); } }); </code></pre> <p>In that server side code I'm generating the HTML table using this code</p> <pre><code> HTML += "&lt;table id='excelDoc'&gt;"; HTML += "&lt;tr&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Reference&lt;/th&gt;&lt;th&gt;Nominal Code&lt;/th&gt;&lt;th&gt;Dept Code&lt;/th&gt;&lt;th&gt;Debit&lt;/th&gt;&lt;th&gt;Credit&lt;/th&gt;&lt;/tr&gt;"; HTML += "&lt;tr&gt;&lt;td&gt;" + eDoc.posting_Date.ToShortDateString() + "&lt;/td&gt;&lt;td&gt;" + eDoc.Description + "&lt;/td&gt;&lt;td&gt;" + eDoc.Ref_Number + "&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td class='db'&gt;&lt;/td&gt;&lt;td class='cr'&gt;&lt;/td&gt;&lt;/tr&gt;"; </code></pre> <p>HTML += "";</p> <p>status = "{status : 1 , message : " + HTML + "}"; return " ["+ status+ "]";</p> <p>Please Help me. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload