如何使用javascript向gridview添加autopostback [英] How to add autopostback to gridview using javascript

查看:73
本文介绍了如何使用javascript向gridview添加autopostback的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个文本框,一个是for patientid,另一个是Amount,我也有一个gridview。该gridview包含3列:第一列是Checkbox,第二列是TestName,第三列是金额......



现在我通过以下步骤预订新患者:



1.在第一个文本框中输入患者ID

2.需要进行哪些测试我们应该检查该gridview中的复选框。当我勾选复选框时,它会在另一个文本框中显示相应的测试金额。

如果我在该gridview中选中另一个复选框,则添加金额,如现有的已检查测试金额+新检查的测试金额。这是这种形式的过程...



i使用jquery和javascript检查复选框...



现在它工作正常...但是当我需要更新现有病人时它不工作



帮助我..

I have two textbox in the form one is for patientid then another one is for Amount and also i have one gridview. That gridview contains 3 columns: first column is Checkbox,second column is TestName,third column is amount...

Now i booking the new patient by following steps:

1.Enter patient id in the first textbox
2.Which test need to take we should check the checkbox in that gridview. when i check the checkbox it will display the corresponding test amount in that another textbox.
if i check another checkbox in that gridview the amount add like existing checked test amount + newly checked test amount. It is the process in this form...

i used jquery with javascript to checking the checkbox...

now it is working fine... but when i need to update the existing patient its not working

Help me..

推荐答案

你可以使用__doPostBack函数触发回发。

参考



dopostback-function-in-javascript.html [ ^ ]
You can trigger postback using __doPostBack function.
Refer

dopostback-function-in-javascript.html[^]


这篇关于如何使用javascript向gridview添加autopostback的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆