By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,590 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,590 IT Pros & Developers. It's quick & easy.

How to synchronize Label1.text between Client Script & Code Behind?

P: n/a
Hi all,

How to synchronize Label1.text between:
document.getElementById("Label1").innerText (at Client Script) & Label1.text
(Code Behind).

I mean, I have assign new value to Label1 in Client Script, i.e.:

document.getElementById("Label1").innerText = "ABC"

How to get "ABC" value from Code Behind, i.e. I want to add new value to my
database:

clsTable myTable = new clsTable();
myTable.InsertArticle(Label1.Text); // Not Working...

How to solve this problem?

Thx,
Julius F
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Julius,

You have to pass the new value from client to server separately, the Label
element won't do it for you. There is a number of ways for doing this, most
common one is via a hidden <input> element.

Eliyahu

"Julius Fenata" <id****@gmx.net> wrote in message
news:ek**************@tk2msftngp13.phx.gbl...
Hi all,

How to synchronize Label1.text between:
document.getElementById("Label1").innerText (at Client Script) & Label1.text (Code Behind).

I mean, I have assign new value to Label1 in Client Script, i.e.:

document.getElementById("Label1").innerText = "ABC"

How to get "ABC" value from Code Behind, i.e. I want to add new value to my database:

clsTable myTable = new clsTable();
myTable.InsertArticle(Label1.Text); // Not Working...

How to solve this problem?

Thx,
Julius F

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.