---
title: "Explain how to access ViewState value of this page in the next page."  
description: "Explain how to access ViewState value of this page in the next page."  
author: "Chris Anderson"  
published: 2011-10-11  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/1285/explain-how-to-access-viewstate-value-of-this-page-in-the-next-page  
category: "asp.net mvc"  
tags: ["asp.net mvc"]  
reading_time: 1 minute  

---

# Explain how to access ViewState value of this page in the next page.

PreviousPage property is set to the page property of the nest page to access the viewstate value of the page in the next page. Page poster = this.PreviousPage;\
Once that is done, a control can be found from the previous page and its state can be read. \
Label posterLabel = poster.findControl("myLabel");\
string lbl = posterLabel.Text;

## Answers

### Answer by Chris Anderson

PreviousPage property is set to the page property of the nest page to access the viewstate value of the page in the next page. Page poster = this.PreviousPage;\
Once that is done, a control can be found from the previous page and its state can be read. \
Label posterLabel = poster.findControl("myLabel");\
string lbl = posterLabel.Text;


---

Original Source: https://www.mindstick.com/interview/1285/explain-how-to-access-viewstate-value-of-this-page-in-the-next-page

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
