Client Side changes not refecting server side label

Discussion in 'ASP .Net' started by =?Utf-8?B?U3Jpbmk=?=, Feb 19, 2004.

  1. I have a server side label and text box
    From the client side I am changing the value of the ASP.NET labe
    using the innerText property of the label.
    When I try to access the label from the server side I am getting the old valu
    of the label which was initially populated before calling the java script function .
    Can anyone tell me what is going wrong

    Regards
    Srini
    =?Utf-8?B?U3Jpbmk=?=, Feb 19, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?U3Jpbmk=?=

    Rajiv R Guest

    Hi Srini

    If you understand how data is sent to the server when you submit is form on
    a page, you will realise that the form elements (<input>,<select>) is sent
    as a querystring or as name-value pairs.

    labels are not form elements and this is not send/postedback to the server.

    what you may do is have a hidden form element and update it with the same
    value as u set ur label to and access the hidden form element in your
    server.

    hope that helps
    --
    Cheers!
    Rajiv. R
    Rajspace.Org

    "Srini" <> wrote in message
    news:...
    > I have a server side label and text box.
    > From the client side I am changing the value of the ASP.NET label
    > using the innerText property of the label.
    > When I try to access the label from the server side I am getting the old

    value
    > of the label which was initially populated before calling the java script

    function .
    > Can anyone tell me what is going wrong.
    >
    > Regards,
    > Srini
    Rajiv R, Feb 19, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?U3Jpbmk=?=

    Rajiv R Guest

    Hi Ajax,

    Could you elaborate?

    --
    Cheers!
    Rajiv. R
    Rajspace.Org

    "Ajax" <> wrote in message
    news:...
    > I'm agree with the hidden control solution for the label problem but I

    still have the same problem with the select.
    Rajiv R, Feb 20, 2004
    #3
  4. Sorry,
    I have 2 listbox server controls in my page and I want to interchange items between them. One solution could be make the interchange in the server, another could be make it in the client. When I tried to achieved client solution I made the changes in "select" that result from the "listbox" on the server, and when a post was made it I got the original listbox without any of changes I made

    Thanks for your attention.
    =?Utf-8?B?YWpheA==?=, Feb 21, 2004
    #4
    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. Sumit
    Replies:
    1
    Views:
    320
    Rajesh.V
    Oct 16, 2003
  2. nick
    Replies:
    3
    Views:
    3,182
    Eliyahu Goldin
    Dec 15, 2004
  3. Joe Abou Jaoude
    Replies:
    2
    Views:
    165
    Joe Abou Jaoude
    Nov 18, 2004
  4. nick
    Replies:
    1
    Views:
    210
    Victor Garcia Aprea [MVP]
    Dec 23, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    263
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page