c# - Passing values from button click event to jquery -


i have following code behind button click event:

 protected void buttonaccept_click(object sender, eventargs e)  {       string datatable;       datatable tbl1 = gridview1.datasource datatable;       } 

i need have both datatable , tbl1 used #buttonaccept

 $("#buttonaccept").ajaxsubmit(                   "./test/writetodb"                   , function (response) {                       info(                          "datasaved."                               }                       ); 

any ideas how achieve this?

var gvtable = $('#gridview1').datatable();

i think give datatable access.

as datatable string. use hiddenfield, populate in click method, reference in ajaxsubmit client side event?


Comments