1

I have following code behind button click event:

 protected void buttonAccept_Click(object sender, EventArgs e)
 {
      string dataTable;
      DataTable tbl1 = GridView1.DataSource as DataTable;     
 }

I need to have both dataTable and tbl1 used from #buttonAccept

 $("#buttonAccept").ajaxSubmit(
                  "./test/writeToDb"
                  , function (response) {
                      Info(
                         "DataSaved."     
                         }
                      );

Any ideas how to achieve this?

4

1 回答 1

0

var gvTable = $('#GridView1').dataTable();

我认为这将为您提供要访问的数据表。

至于dataTable字符串。您可以使用隐藏字段,在 Click 方法中填充它,然后在 ajaxSubmit 客户端事件中引用它吗?

于 2013-10-28T20:44:52.230 回答