且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在服务器端访问html表数据

更新时间:2023-11-27 21:56:22



使用隐藏变量保存由javascript动态生成的表.
在转到服务器端之前,请填充隐藏字段(服务器端控件),并在后页代码中对其进行访问.

问候,
Jitendra Zaa
Hi,

Use hidden variable to save the table generated dynamically by javascript.
Before going to server side, populate the hidden field (Server side control) and access it in back page code.

Regards,
Jitendra Zaa


asdf,

为什么不将表放入UpdatePanel并将行添加到服务器端本身.

如果只希望使用javascript,并且还说表仅设置为初始行,请确保在页面加载回发时不要初始化数据或将数据绑定到表.第一次页面加载应将数据填充到表中,而不是在回发时填充以关联客户端数据.
asdf,

Why don''t you put the table in the UpdatePanel and add the rows on server side itself.

If you want in javascript only, and also you said table is set to intial rows only, make sure that you don''t intialize or bind data to table on postback in page load. First time page load should populate data to table but not on postback to pertain the client side data.