Results 1 to 5 of 5

Thread: textbox value disappears on BACK !!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    110

    textbox value disappears on BACK !!

    I have a textbox in my ASP.Net page.
    It gets its value from a Pop-Up. User doesnt enter anything.
    After that user moves to the next page.
    But when he comes back... values in all other controls are retained except that of the textbox.

    what could be the reason ???
    Anis Bombaywala

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Is the textbox being populated by client side script?

  3. #3
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    I know this is a work around, but cookies could be used for this. obviously it would be better fixing the problem to start off with.
    Have I helped you? Please Rate my posts.

  4. #4
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Its a bit long winded to explain whats happening on your page there, so try looking up this "saveHistory behavior" on MSDN. That will give you the low-down on the problem and the solution.

    If you have explorer 5 or higher then the following should sort you out:

    Add this style to the header of the page:
    Code:
    <meta NAME="save" CONTENT="history">
    <style>
       .saveHistory {behavior:url(#default#savehistory);}
    </style>

  5. #5
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Sorry, forgot to tell you to add the class attribute to the element you want.

    Code:
    <input class=saveHistory>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width