Skip to main content

Toggle ViewState (ASP.NET)

Adds the EnableViewState attribute with the True value to the current control, or inverts the value, if the attribute exists.

#Availability

Available from the context menu or via shortcuts:

  • when the cursor is anywhere within an control.

#Examples

<asp:Button ID="Button1" runat="server" Text="Button" />

Result:

<asp:Button EnableViewState="True" ID="Button1" runat="server" Text="Button" />

#Screenshot

rsToggleViewState

See Also