日期:2014-05-17  浏览次数:20849 次

页面做完后,查看源代码,有个<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value=“”
input里的value的值是一段很长的字符串,这是什么,是正常吗?为什么会产生这么长的值?怎样能使他不产生呢?

/////////////////////////////////////////
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNjQ2MzIyMDY3D2QWAgIDD2QWAgIJDzwrAA0BAA8WBB4LXyFEYXRhQm91bmRnHgtfIUl0ZW1Db3VudAIOZBYCZg9kFiJmD2QWHGYPD2QWAh4Fc3R5bGUFFGJvcmRlci1jb2xvcjojQ0NDQ0NDZAIBDw9kFgIfAgUUYm9yZGVyLWNvbG9yOiNDQ0NDQ0NkAgIPD2QWAh8CBRRib3JkZXItY29sb3I6I0NDQ0NDQ2QCAw8PZBYCHwIFFGJvcmRlci1jb2xvcjojQ0NDQ0NDZAIEDw9kFgIfAgUUYm9yZGVyLWNvbG9yOiNDQ0NDQ0NkAgUPD2QWAh8CBRRib3JkZXItY29sb3I6I0NDQ0NDQ2QCBg8PZBYCHwIFFGJvcmRlci1jb2xvcjojQ0NDQ0NDZAIHDw9kFgIfAgUUYm9yZGVyLWNvbG9yOiNDQ0NDQ0NkAggPD2QWAh8CBRRib3JkZXItY29sb3I6I0NDQ0NDQ2QCCQ8PZBYCHwIFFGJvcmRlci1jb2xvcjojQ0NDQ0NDZAIKDw9kFgIfAgUUYm9yZGVyLWNvbG9yOiNDQ0NDQ0NkAgsPD2QWAh8CBRRib3JkZXItY29sb3I6I0NDQ0NDQ2QCDA8PZBYCHwIFFGJvcmRlci1jb2xvcjojQ0NDQ0NDZAINDw9kFgIfAgUUYm9yZGVyLWNvbG9yOiNDQ0NDQ0NkAgEPD2QWBh4Lb25tb3VzZW92ZXIFZmN1cnJlbnRjb2xvcj10aGlzLnN0eWxlLmJhY2tncm91bmRDb2xvcjt0aGlzLnN0eWxlLmJhY2tncm91bmRDb2xvcj0nI2M5ZGVmYScsdGhpcy5zdHlsZ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8CBRRib3JkZXItY29sb3I6I0NDQ0NDQxYCZg8VAQsyMDEyLTA3LTE0IGQCDQ8PZBYCHwIFFGJvcmRlci1jb2xvcjojQ0NDQ0NDZAIDDw9kFgYfAwVmY3VycmVudGNvbG9yPXRoaXMuc3R5bGUuYmFja2dyb3VuZENvbG9yO3RoaXMuc3R5bGUuYmFja2dyb3VuZENvbG9yPScjYzlkZWZhJyx0aGlzLnN0eWxlLmZvbnRXZWlnaHQ9Jyc7HwQFQXRoaXMuc3R5bGUuYmFja2dyb3VuZENvbG9yPWN1cnJlbnRjb2xvcix0aGlzLnN0eWxlLmZvbnRXZWlnaHQ9Jyc7HwIFC0N1cnNvcjpoYW5kFhxmDw9kFgIfAgUUYm9yZGVyLWNvbG9yOiNDQ0NDQ0NkAgEPDxYCHwUFATMWAh8CBRRib3JkZXItY29sb3I6I0NDQ0NDQ2QCA">

------解决方案--------------------
如果它确实很大(10K根本不算大!而你贴的远远小于10K),你可以写这个代码:
C# code
using System;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using