Assuming you're using ASP.NET Web Forms.
In your .aspx page
TextBox1: <asp:TextBox runat="server" id="TextBox1" /><br />
TextBox2: <asp:TextBox runat="server" id="TextBox2" /><br />
<asp:Button runat="server" id="Button1" OnClick="Button1_Click" Text="Submit" />
In your .aspx.cs page
protected void Button1_Click(object sender, EventArgs e)
{
string original_text=GetOriginalTextOfTextBox1();
if(TextBox1.Text==original_text)
{
//the text didn't change
}
else
{
//the text changed. need to update the transaction table and the user table.
}
string originaltext2=GetOriginalTextOfTextBox2();
if(TextBox2.Text==originaltext2)
{
//the text didn't change
}
else
{
//the text changed. need to update the transaction table and the user table.
}
}
protected string GetOriginalTextOfTextBox1()
{
//code here that gets the original value of TextBox1 from the User table.
}
protected string GetOriginalTextOfTextBox2()
{
//code here that gets the original value of TextBox2 from the User table.
}
}
You'll probably want to combine all this using collections (List) and strongly typed objects once you have the concept down. This will minimize the number of calls to the database and simplify your code.
--Edit--
If you want to store all the history of a single update using a single record in the Transcation table, you need to modify the Transaction table to support all the fields at once. Note that this may not be as space efficient, depending on whether you expect users to update many fields per transaction or just one.
Trans_Id
User_Name
User_Gender
User_Address
Trans_Add_Date