mardi 4 août 2015

Why doesn't the value of SPAN update

ASP.net:

<span id="lblScore" class="lblScore">Your Score is: 0</span>
<asp:Label ID="lblHiddenScore" runat="server" CssClass="lblHScore" Text="" ClientIDMode="Static"></asp:Label>

The following jquery is executed after a certain event:

$(".lblScore").text("");
$(".lblScore").text("Your Score is: " + score);
$(".lblHScore").text(score);

I can see in the front-end, the value is changing but when I view the source of the HTML, it doesn't show the changes.

I am trying to use the score value from code-behind:

string yr = lblHiddenScore.Text; //it is always ""

How can I retrieve the value from the front end to use in code-behind



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire