Refresh problem

Discussion in 'ASP .Net Datagrid Control' started by sunny, Jan 31, 2005.

  1. sunny

    sunny Guest

    I use javascript to modify the label. when I refresh the web page. I lost
    the modification. How can I put it into ViewState or How can I know whether
    it is a refresh or regular postback in code behind?

    any idea?

    Thanks


    Sunny.
     
    sunny, Jan 31, 2005
    #1
    1. Advertising

  2. Sunny,

    If you modify the html presentation of an asp.net Label control, you need to
    communicate the change to the server. You can use an <input type = "hidden">
    for this. On server side you get the value from the hidden input and set the
    label.

    What does it have to do with differentiation between a refresh or regular
    postback in code behind? It's another question. Browser refresh button
    always repeats the last postback. On server side you can tell the difference
    if you include a unique piece of data in the postback, for example a
    timestamp. On the server you compare the timestamp that just came with the
    one from the previous postback. If it's the same, it must be a refresh and
    not an another postback.

    Eliyahu

    "sunny" <> wrote in message
    news:%...
    > I use javascript to modify the label. when I refresh the web page. I lost
    > the modification. How can I put it into ViewState or How can I know

    whether
    > it is a refresh or regular postback in code behind?
    >
    > any idea?
    >
    > Thanks
    >
    >
    > Sunny.
    >
    >
     
    Eliyahu Goldin, Jan 31, 2005
    #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. brian lanning
    Replies:
    0
    Views:
    601
    brian lanning
    Jul 29, 2003
  2. Per Magnus L?vold
    Replies:
    1
    Views:
    5,132
    John C. Bollinger
    Oct 8, 2004
  3. Pkenty
    Replies:
    0
    Views:
    398
    Pkenty
    May 28, 2004
  4. Jawahar Rajan
    Replies:
    1
    Views:
    294
    Adrienne
    Oct 1, 2003
  5. phal

    ReFresh problem or target problem

    phal, Sep 15, 2005, in forum: Perl Misc
    Replies:
    6
    Views:
    132
    Scott Bryce
    Sep 15, 2005
Loading...

Share This Page