ViewState does not work PLEASE HELP !!!

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 ..!!!
 
G

Gerben van Loon

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.
 
I

Igor

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top