You as software developer can use code to add information directly to the view state collection of the containing page and recover it later after the page is posted back. The type of information you can store includes not only the simple data types, but your custom objects too.   The view state collection is provided by ViewState property of the page. To add and remove items in this class, you should use a dictionary based syntax, where every item has a unique string name:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

ViewState(“ZIPCode”) = 123456

When you need to restore (retrieve) the value, you should use the key name. You need to cast the retrieved value to the appropriate data type, because the ViewState collection stores all items as generic objects, which allows it to handle many different data types:

Dim zipCode as Integer
zipCode = CInt(ViewState(“ZIPCode”))