You will need to reflect the jQuery changes in another control that will act on the server side.
For example, use a hidden field that was changed runat="server"
shadow of your change to this, then it will be stored on the server, that is, read the label change from the hidden field
So
JQuery
$('#labelID').html('New Text'); $('#hiddenFieldID').val('New Text');
Server side
string labelText = hiddenFieldID.value;
This is not very, but this is the only way I found.
JQuery does not interact with ViewState
, so any changes to jQuery are lost in the postback. This is one of the reasons why I think that people are now moving towards MVC. The postback architecture does not work well with client-side changes.
source share