Is there a way to highlight the difference between two corresponding labels/textboxes within two formviews? I have two formviews on a webpage, the second of which displays after a user edits the first formview and clicks the update button. The second formview shows the updates the user just made while the first formview shows the database row as it was before the user edited it.
So if both formviews have a textbox or label that display phonenumber and the user changed the phonenumber, I'd like the phonenumber in the second formview to be highlighted. I'd need to compare each pair of textboxes or labels in the two formviews. Also, if one of the formviews has an empty textbox or label and the corresponding label/textbox in the other formview has content, I'd want to highlight that as well. I mention that because I usually do something like (an unrelated example):
Code:
If FormView1.CurrentMode = FormViewMode.Edit Then
Dim UpdDate As TextBox = TryCast(FormView1.FindControl("UpdDateTextBox"), TextBox)
If UpdDate IsNot Nothing Then
UpdDate.Text = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss tt")
so I'm not sure how compare when one or both of the controls is empty.
Thanks for reading and if you can suggest some logic to use I will be very appreciative.