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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top