本文介绍了在保存之前,仅在第二页上确认修改后的值的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我需要在保存到第二页之前确认仅修改的值,这样我才能知道在发送它之前在页面中真正改变了什么以保存在Asp .Net中。 我的尝试: 需要专业人士的解决方案解决方案 您可以将值保存到类的对象,然后将对象保存到会话。然后你可以从会话中检索对象。 示例: 学生objStudent = new Student(); // 初始化您的实际课程 objStudent.Name = txtbox1.Text; objStudent.RollNumber = txtbox2.Text; 会话[ 学生] = objStudent; 您可以从会话中检索数据 - 学生objNewStudent =(学生)会话[ 学生]; 现在您可以根据需要使用这些属性。 希望,它有帮助:) I need to confirm only modified values before save in second page so i get to know what is really changed in page before sending it to save in Asp .Net.What I have tried:Need a solution from professionals 解决方案 You can save the values to object of an class and then the object to the session. Then later you can retrieve the object from session.Example:Student objStudent=new Student(); //initialize your actual classobjStudent.Name=txtbox1.Text;objStudent.RollNumber=txtbox2.Text;Session["student"] = objStudent;You retrieve data back from session like-Student objNewStudent=(Student) Session["student"];Now you can use the properties as required.Hope, it helps :) 这篇关于在保存之前,仅在第二页上确认修改后的值的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-30 16:51