How change Label's Text value in client side and postback to Server?

J

jiatiejun

I want change the Label's Text value in client side by javascript

I use getElementById to set control's innerText value

but the new value can't postback to Server

how to pass the value to Server?

thanks
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

The common approach would be to write the new name into a hidden field using
client side code.
Then upon postback you can get the value from the hidden field with server
side code and then assign it to the label's text property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,075
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top