I know you can disable ViewState via the methods described here, but I'm wondering if it's possible to disable it via a form input from a client.
For example can you POST a value like disable_view_state=1
or in cookies or something similar?
No, that is not possible.When the page first renders viewstate will always be there unless you disable viewstate at the control level or at page level.
Your best bet is to disable it at the page level by using following page directive at top of page markup, so when page first renders it doesn't have viewstate. Note that ViewStateMode="Disabled"
setting in page directive for disabling view state for all control in the page.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RepeaterPage.aspx.cs"
Inherits="RepeaterPage" ViewStateMode="Disabled" %>
<!DOCTYPE html>