ASP:Label runat="server" and innerText

Discussion in 'ASP .Net' started by Bob, Feb 20, 2008.

  1. Bob

    Bob Guest

    When I use an ASP:Label with runat="server", and in JavaScript I use
    innerText on the ASP:Label, the Text property is not reflected in an event
    postback on the form. ASP:TextBox is not an alternative for me because it
    doesn't produce text which can be inline and wrappable with surrounding
    text. Is there anyway to accomplish what I am trying to do?

    Thanks
    Bob, Feb 20, 2008
    #1
    1. Advertising

  2. That's right, client changes to a Label won't propagate to the server. You
    can copy the text into a hidden input control to pass it on.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "Bob" <> wrote in message
    news:%...
    > When I use an ASP:Label with runat="server", and in JavaScript I use
    > innerText on the ASP:Label, the Text property is not reflected in an event
    > postback on the form. ASP:TextBox is not an alternative for me because it
    > doesn't produce text which can be inline and wrappable with surrounding
    > text. Is there anyway to accomplish what I am trying to do?
    >
    > Thanks
    >
    >
    Eliyahu Goldin, Feb 20, 2008
    #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. Hazzard
    Replies:
    2
    Views:
    529
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  2. SMichal
    Replies:
    1
    Views:
    4,916
    Andy Klare
    Nov 30, 2006
  3. Giles

    asp innerText?

    Giles, Feb 16, 2006, in forum: ASP General
    Replies:
    5
    Views:
    149
    Tom Kaminski [MVP]
    Feb 17, 2006
  4. GarryJones

    srcElement and innerText and?

    GarryJones, Sep 6, 2008, in forum: Javascript
    Replies:
    5
    Views:
    146
    Nick S
    Sep 6, 2008
  5. Knut Krueger
    Replies:
    8
    Views:
    251
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page