Software developer can encrypt an individual page only if a control specifically requests it using ViewStateEncryption-Mode property of the Page directive:

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

<%@Page ViewStateEncryptionMode=”Auto”>

The developer can set the same attribute in a configuration file:

<configuration xmlns =>
        <pages viewStateEncryptionMode=”Auto”>

Note: Encryption imposes a performance penalty, because the web server will perform the encryption and decryption with each postback.  Don’t encrypt view state if you don’t need to do it.