ViewState
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jan 14, 2008 3:14 pm
- Location: Dayton, Ohio
ViewState
I need to keep view state turned on the OnePageCheckout page. I know by default that the view state is on, but something is turning it off when you get the page_init event. Does anyone have any ideas on how to keep the view state on? What is triggering view state off?
Thanks,
Dave
Thanks,
Dave
Re: ViewState
OnePageCheckout control is making use of custom view state by disabling view state one many controls. What do you want to do, if you are trying to do something with ViewState data then I think it will be available after Page_InIt event.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jan 14, 2008 3:14 pm
- Location: Dayton, Ohio
Re: ViewState
Thank Mazhar for your response.
I checked the page_load event and the view state is on but i noticed that there is nothing in the state bag. What happened to the item I saved to it on a previous page?
I checked the page_load event and the view state is on but i noticed that there is nothing in the state bag. What happened to the item I saved to it on a previous page?
Re: ViewState
If you want to pass something between different pages then you may make use of Session object.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jan 14, 2008 3:14 pm
- Location: Dayton, Ohio
Re: ViewState
I had used the Session object before, but I ran into some problems with it so I went to view state. I will review the Session object again.
Thank You!
Thank You!
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: ViewState
On a previous (different) page or on a previous load of the one page checkout?dittohead wrote:What happened to the item I saved to it on a previous page?
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jan 14, 2008 3:14 pm
- Location: Dayton, Ohio
Re: ViewState
On a previous (different) page.
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: ViewState
Generally, ViewState does not persist across different pages. ViewState values can only be accessed on the same page (on a postback). To maintain values across pages you either have to save in session, database, or include in a url parameter.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 36
- Joined: Mon Jan 14, 2008 3:14 pm
- Location: Dayton, Ohio
Re: ViewState
Thanks Logan for your response.
I am finally getting access to the data I need.
I am finally getting access to the data I need.
Re: ViewState
sounds gooddittohead wrote:Thanks Logan for your response.
I am finally getting access to the data I need.