本文介绍了如何跟踪控件的值是Detailview中的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用DetailView.in我使用了许多控件,如TextBox,Checkbox,DropdownList等,以及许多验证控件,如Required Field Validator,Compare Validator,Custom Validator等,以对给定值执行不同类型的验证. >
当用户在此Detailview的编辑"模式下单击更新"按钮时,我要添加一项功能,以检查所有控件的值是否已更改&所有变更值均比其要求确认更改有效.如果任何更改的值不正确,那么将触发验证消息..如何实现这一点...并不是在所有更改后的值都正确或触发验证消息的情况下,在请求确认时不会回发整个过程页面.仅当用户单击确认窗口的确定"按钮更改值时,页面才回发.

我已经使用了Hiddenfield,但是问题是,对于detailview的每个控件,我都必须使用单独的hiddenfield ..是否还有其他简单的方法来实现此要求...?

I have use DetailView.In that i have use many controls like TextBox,Checkbox,DropdownList etc with many validation controls likes Required Field Validator,Compare Validator,Custom Validator etc to performed different types of Validation on given values.

I want to add one feature when user click on update button in Edit mode of this Detailview its check that value(s) of any controls is change & all chnaged values are valid than its asked for confirmation about changes & if any changed value is not correct than validation message is fire..How to achieve this...Not that during entire process page is not post back while asking for confiramtion in case of all changed values are correct or fire validation message. Page is only postback when user click on OK button of confimation window to change value.

I have use Hiddenfield but problem is that for each controls of detailview i have to use seprate hiddenfield..is there any other simple approach to achieve this requierment...?

推荐答案


这篇关于如何跟踪控件的值是Detailview中的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 16:49