Professional Web Applications Themes

viewstate question - ASP.NET General

I have a form on my page. when I submit it and hit the back button on my browser all of the information is gone. I have enableViewState set to true in my page directive.. isn't that the point of it? what else do I need to do to get my form to maintain it's state? I have two methods of submitting that I've tried.. one does a response.redirect, the other hides the UserControl with my form on it and shows another UC with my next page on it. either way when I hit back the form is empty. I ...

  1. #1

    Default viewstate question

    I have a form on my page. when I submit it and hit the
    back button on my browser all of the information is gone.
    I have enableViewState set to true in my page directive..
    isn't that the point of it? what else do I need to do to
    get my form to maintain it's state?


    I have two methods of submitting that I've tried.. one
    does a response.redirect, the other hides the UserControl
    with my form on it and shows another UC with my next page
    on it. either way when I hit back the form is empty.

    I am prepared to store the field values in my session and
    have my form pull them back out if they are there (when I
    hit back), but I though this viewstate thing was supposed
    to take care of all that for me.
    Will Guest

  2. #2

    Default Re: viewstate question

    Viewstate is stored in the HTML of the page. When you hit your browser's
    Back button, you are navigating to a previous version of the page, with the
    ViewState that was in it at that time.

    Is there some reason you NEED to use the Back button of your browser for
    navigation in your app?

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    The more I learn, the less I know.


    "Will" <net> wrote in message
    news:009e01c368bb$8bd48680$gbl... 


    Kevin Guest

  3. #3

    Default Re: viewstate question


    no, I was just wondering about that.. thanks

     
    your browser's 
    the page, with the 
    your browser for [/ref]
    gone. [/ref]
    directive.. [/ref]
    UserControl [/ref]
    page [/ref]
    and [/ref]
    I [/ref]
    supposed 
    >
    >
    >.
    >[/ref]
    Will Guest

Similar Threads

  1. Failed to load viewstate. The control tree into which viewstate...
    By Josema in forum ASP.NET Building Controls
    Replies: 5
    Last Post: April 13th, 07:48 AM
  2. Question about duplicate ViewState keys.
    By Ken Varn in forum ASP.NET Building Controls
    Replies: 1
    Last Post: September 9th, 02:34 PM
  3. Viewstate question
    By M O J O in forum ASP.NET Data Grid Control
    Replies: 3
    Last Post: March 18th, 01:09 PM
  4. Viewstate errors... how do I get viewstate working?
    By mark in forum ASP.NET Building Controls
    Replies: 0
    Last Post: February 20th, 02:17 PM
  5. Newbie question on Viewstate information
    By raagz in forum ASP.NET General
    Replies: 2
    Last Post: June 27th, 11:01 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139