Updating label using jquery and code behind

Posted by Zaps on Stack Overflow See other posts from Stack Overflow or by Zaps
Published on 2010-06-01T11:38:45Z Indexed on 2010/06/01 11:43 UTC
Read the original article Hit count: 259

Filed under:
|
|

Hi,

I have a label on a page and I'm updating the text property of the label when text is changed in a textbox.

I'm updating the label like so:

$myLabel.text("hello");

The text is being displayed correctly on the screen butwhen I try to save the text value to an object in the code behind (When I press a button) the text property of the label is "" and not "hello".

var myLabel = myLabel.Text;
//the var myLabel is "" when it should be "hello"

Any ideas as to why this would be?

Thanks in advance,

Zaps

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery