简体   繁体   English

如何检测页面控件的值已更改以及哪些值已更改

[英]How do I detect my page control values are changed and what values are changed

i have asked a similar question earlier, but this time i need a method that will detect any change made on any control of the page with old and new values in a combined string to maintain history of that particular change. 我之前已经问过类似的问题,但是这次我需要一种方法,该方法将检测在组合字符串中具有旧值和新值的页面的任何控件上所做的任何更改,以维护该特定更改的历史记录。 Say if a user made in 4 fields of a page the method will be able to detect the change and create a string with change in old and new values. 假设如果用户在页面的4个字段中输入内容,则该方法将能够检测到更改并创建具有新旧值更改的字符串。

Note - My page controls are using Class Properties to display values. 注意-我的页面控件正在使用“类属性”来显示值。

My simple opinion is : 我的简单意见是:

Just put your "Class" properties into Session (it means : put your data(s) into Session which is load data(s) from default). 只需将您的“类”属性放入会话中即可(这意味着:将您的数据放入会话中,这是默认情况下的加载数据)。 After that on your Save button event , you can compare your Session which is contains old data(s) with new user changes data(s). 之后,在“ 保存”按钮事件上 ,您可以将包含旧数据的会话与新用户更改的数据进行比较。 At this case you can create your own method (at your page control) to detect values changes. 在这种情况下,您可以创建自己的方法(在页面控件中)以检测值更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM