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

Discussion in 'ASP .Net Web Controls' started by jiatiejun, Jul 25, 2007.

  1. jiatiejun

    jiatiejun Guest

    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
    jiatiejun, Jul 25, 2007
    #1
    1. Advertising

  2. 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.

    --
    I hope this helps,
    Steve C. Orr,
    MCSD, MVP, CSM, ASPInsider
    http://SteveOrr.net


    "jiatiejun" <> wrote in message
    news:...
    >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
    >
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider], Jul 25, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3Jpbmk=?=

    Client Side changes not refecting server side label

    =?Utf-8?B?U3Jpbmk=?=, Feb 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    710
    =?Utf-8?B?YWpheA==?=
    Feb 21, 2004
  2. nick
    Replies:
    3
    Views:
    3,166
    Eliyahu Goldin
    Dec 15, 2004
  3. Server Control
    Replies:
    4
    Views:
    760
  4. nick
    Replies:
    1
    Views:
    204
    Victor Garcia Aprea [MVP]
    Dec 23, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    253
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page