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ozs+O3Q8cDxwPGw8VGV4d
Ds+O2w8THVjZXJuZSBQdWJsaXNoaW5nOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxQYXJp
czs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w8Jm5ic3BcOzs+Pjs+Ozs+O3Q8cDxwPGw8VGV
4dDs+O2w8RnJhbmNlOz4+Oz47Oz47Pj47Pj47Pj47Pj47Pj47Pg==" />
看!只是禁用了该网格的 ViewState,同一页面的有效负载就大大减少了:
<HTML>
<HEAD>
<title>减少页面的“HTML 有效负载”</title>
</HEAD>
<body>
<form name="_ctl0" method="post" action="lessviewstate.aspx" id="_ctl0">
<input type="hidden" name="__VIEWSTATE" value="dDwxNTgzOTU2ODA7Oz4=" />
下面是 Visual Basic 和 C# 的完整的 LessViewState 代码:
[Visual Basic]
<%@ Import Namespace="System.Data" %>
<html>
<HEAD>
<title>减少页面的“HTML 有效负载”</title>
</HEAD>
<body>
<form runat="server">
<H3>
通过禁用 ViewState 来减少页面的“HTML 有效负载”
</H3>
<P>
<asp:datagrid