S
Satish Appasani
Is there any ideal way of passing values to another page using Post method
and avoiding Sessions and Viewstate?
I have used Viewstate unsuccessfully. Though I've set all the required
attributes to the form including enableviewstatemac property to false. But
it did not work.
The I used the following code:
In the source page add the code:
Me.Context.Items.Add("Value", txtValue.Text)
In the destination page add the code :
Me.Context.Items.Item("Value").ToString
This was working on my machine but when I moved it to the client's server, I
was getting error "Viewstate corrupted". I felt the problem was with the
client's .NET Framework version. They use 1.0 whereas I use 1.1. So, atlast
I pulled in the Session. This was working fine. After I use the data fetched
by the session, I am putting the value in the ViewState of the destination
form and killing the session (Session("ID") = Nothing). Now, If I click on
the browser's refresh button, my application does not work because I don't
have the value in the session. And the Viewstate also does not contain the
stored value wither.
I can't retain the value in the session because else where in the
application I am opening the same page but then don't pass any values.
I was thinking there should be an ideal way to post values to a new page
other than using Viewstate and Session.
--
Thank you.
Satish Appasani
#201, Wing - 1, Block - D
Cyber Gateway
Hyderabad - 500 081, India
Phone: +91(40)2311-1356 Ext-122
Mobile: +91(40)333-31032
E-mail: (e-mail address removed)
and avoiding Sessions and Viewstate?
I have used Viewstate unsuccessfully. Though I've set all the required
attributes to the form including enableviewstatemac property to false. But
it did not work.
The I used the following code:
In the source page add the code:
Me.Context.Items.Add("Value", txtValue.Text)
In the destination page add the code :
Me.Context.Items.Item("Value").ToString
This was working on my machine but when I moved it to the client's server, I
was getting error "Viewstate corrupted". I felt the problem was with the
client's .NET Framework version. They use 1.0 whereas I use 1.1. So, atlast
I pulled in the Session. This was working fine. After I use the data fetched
by the session, I am putting the value in the ViewState of the destination
form and killing the session (Session("ID") = Nothing). Now, If I click on
the browser's refresh button, my application does not work because I don't
have the value in the session. And the Viewstate also does not contain the
stored value wither.
I can't retain the value in the session because else where in the
application I am opening the same page but then don't pass any values.
I was thinking there should be an ideal way to post values to a new page
other than using Viewstate and Session.
--
Thank you.
Satish Appasani
#201, Wing - 1, Block - D
Cyber Gateway
Hyderabad - 500 081, India
Phone: +91(40)2311-1356 Ext-122
Mobile: +91(40)333-31032
E-mail: (e-mail address removed)