ViewState does not work PLEASE HELP !!!

  • Thread starter Thread starter Igor
  • Start date Start date
I

Igor

Started out with a blank VB WEB project.
Added Webform2.aspx

iN webform1.aspx.vb on page load

viewstate("test")="SOMEVALUE"

added a button to Webform1 that redirects to Webform2.aspx using
response.redirect("Webform2.aspx")

In Webform2.aspx on page load:
response.write(ViewState("test"))

YELDS NOTHING
I checked that both pages have enableviewstate set to true
Is there anything else I need to check (maybe something is wrong with
my machine ....)

PLEASE HELP ..!!!
 
Hi Igor,

There is nothing wrong with your machine. The ViewState only works for a
page, if you want a state mechaninsm that goes over different pages you
should use the sessionstate. Hope this helps.

Greets,

Gerben van Loon.
 
Thank you.

it makes a lot of sence I have no Idea why would I assume that
ViewState carries on


This would result in a huge evergrowing pile of useless data being
dragged around aplication.
 
Back
Top