If you just need this operation you can use some of the events on clientside for textbox.
There is for example a onchange event for textbox on clientside. You can use it and after validation the text of your label will be changed.
Just add this line to your code and try it:
txtGainMark.Attributes.Add("onchange", "javascript:document.getElementById('lblDataOperation').innerHTML = this.value;");
And remove the following code:
txtGainMark.TextChanged += new EventHandler(updateGivenMark);
And here is a really good article how to send data from client to serverside in ASP .Net:
Send and receive JavaScript Array to Web Service Web Method using ASP .Net-AJAX[
^]
I hope I could help you!