Persisting Label/Select Box Control values changed from client side during Postback

Discussion in 'ASP .Net' started by Server Control, Dec 7, 2005.

  1. Hi,
    I have a datagrid(within a user control) that has label controls. I
    have added hidden fields in the datagrid alongwitht the label control.
    I do some client side editing with javascript and somehow want to reset
    the label value through javascript? I could grab the id of the row that
    had the label in it (now converted to a span at client side) by
    accessing the corresponding hidden field with it.
    var hdnLabel = rowHandle.getElementsByTagName("input");
    for(var i = 0 ; i < hdnLabel.length ; i++)
    {
    if(hdnLabel.type == "hidden")
    {
    hdnLabel.value = "Some Value";
    }
    }

    After setting this value, postback happens. Now how do i somehow
    associate the value of this particular hidden variable with the label
    that I want to reset at client side. At server side, i am unable to
    find a wayto identify my hidden variable(since there is one per row
    with clientIDs) say through Request.Form[????]. And if i grab that
    value somehow where do i specify this value to my label??
    I am facing a smilar problem with my dropdown in datagrid. I add List
    items to it through javascript...and now when post back happens, i want
    to show the items that were added as well??

    Request for an urgent reply!!!!

    Thanks in advance
     
    Server Control, Dec 7, 2005
    #1
    1. Advertising

  2. Server Control

    KJ Guest

    Hmm, I'm not sure if I understand correctly, but, perhaps you might
    consider adding the new values to ViewState, then, after postback, pull
    them from there again. But, as I said, I'm not sure I understand the
    scenario.
     
    KJ, Dec 8, 2005
    #2
    1. Advertising

  3. Server Control

    KJ Guest

    Hmm, I'm not sure if I understand correctly, but, perhaps you might
    consider adding the new values to ViewState, then, after postback, pull
    them from there again. But, as I said, I'm not sure I understand the
    scenario.
     
    KJ, Dec 8, 2005
    #3
  4. Server Control

    KJ Guest

    Hmm, I'm not sure if I understand correctly, but, perhaps you might
    consider adding the new values to ViewState, then, after postback, pull
    them from there again. But, as I said, I'm not sure I understand the
    scenario.
     
    KJ, Dec 8, 2005
    #4
  5. Server Control

    KJ Guest

    Sorry about the extra posts. Google groups is not working too well.
    Maybe someone here can help them out :)
     
    KJ, Dec 8, 2005
    #5
    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. John Saunders
    Replies:
    0
    Views:
    495
    John Saunders
    Aug 29, 2003
  2. nick
    Replies:
    3
    Views:
    3,242
    Eliyahu Goldin
    Dec 15, 2004
  3. nick
    Replies:
    1
    Views:
    227
    Victor Garcia Aprea [MVP]
    Dec 23, 2004
  4. palmiere
    Replies:
    1
    Views:
    465
    Erwin Moller
    Feb 9, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    325
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page