jquery datatable editor plugin not working in asp.net(c#)
<p>I am using datatable editor plugins to insert rows into datatable but it is not working. Please see my code below.</p>

<pre><code>// Create the form
editor = new $.fn.dataTable.Editor({
    "ajaxUrl": {
        "create": 'Default.aspx/InsertNewuser'
    },
    "domTable": "#tbl",
    "fields": [{
            "label": "FirstName:",
            "name": "FirstName"
        },
        {
            "label": "LastName:",
            "name": "LastName"
        }]
});
</code></pre>

<p>new row code :</p>

<pre><code>// New record
$('a.editor_create').on('click', function (e) {
  e.preventDefault();
  editor.create(
    'Create new record', {
      "label": "Add",
      "fn": function () {
        editor.submit();
      }
    });
})
</code></pre>

<p>And the c# code from Default.aspx.cs:</p>

<pre><code>[WebMethod]
public static int InsertNewuser(string FirstName, string LastName)
{
    DataClasses1DataContext db = new DataClasses1DataContext();
    student1 table = new student1();

    table.FirstName = FirstName;
    table.LastName = LastName;

    db.student1s.InsertOnSubmit(table);
    db.SubmitChanges();
    return table.Std_ID;
}
</code></pre>
