I have a web application that will take the values from an aspx page and saves it into a dataset to be saved into a DB2 table as XML. This application can also fetch the same XML and puts it back into the dataset and bind to various control e.g textboxes on the aspx page. The question is how do I do a comparison between the previously saved value and the current value and have a different font colour for those textboxes whose values have changed.
Finding the differences in value between 2 dataset and showing highlighting the difference on an ASPX page
42 views Asked by Yeow Ping Poo At
2
Here's what comes to my mind. Xml is Lines of String. Which means you've got two List<string> and in simple case you can compare index x from first to the same index in other.
This approach only gives you the lines that differ. You can broadly mark these lines as different. If you want to color code matches vs differences on character/word level like how Beyond compare or WinMerge do, that's bit more comparison and Styling. May be see if there's any nuget for finding string mismatches and how you can use that information for color coding.