私はそれはあなたのニーズに合うかどうかわからないんだけど、あなたは、このツールをチェックアウトすることができます:あなたがログにViewStateの内容をダンプしているかをチェックするヘルパークラス
http://www.pluralsight-training.net/community/media/p/51688.aspx
そして、ここですファイル。明らかに、必要に応じて変更することができます。
// Written by Greg Reddick. http://www.xoc.net
public static void SeeViewState(string strViewState, string strFilename)
{
if (strViewState != null)
{
Debug.Listeners.Clear();
System.IO.File.Delete(strFilename);
Debug.Listeners.Add(new TextWriterTraceListener(strFilename));
string strViewStateDecoded = (new System.Text.UTF8Encoding()).GetString(Convert.FromBase64String(strViewState));
string[] astrDecoded = strViewStateDecoded.Replace("<", "<\n").Replace(">", "\n>").Replace(";", ";\n").Split('\n');
Debug.IndentSize = 4;
foreach (string str in astrDecoded)
{
if (str.Length > 0)
{
if (str.EndsWith("\\<"))
{
Debug.Write(str);
}
else if (str.EndsWith("\\"))
{
Debug.Write(str);
}
else if (str.EndsWith("<"))
{
Debug.WriteLine(str);
Debug.Indent();
}
else if (str.StartsWith(">;") || str.StartsWith(">"))
{
Debug.Unindent();
Debug.WriteLine(str);
}
else if (str.EndsWith("\\;"))
{
Debug.Write(str);
}
else
{
Debug.WriteLine(str);
}
}
}
Debug.Close();
Debug.Listeners.Clear();
//Get into the debugger after executing this line to see how .NET looks at
//the ViewState info. Compare it to the text file produced above.
Triplet trp = (Triplet) ((new LosFormatter()).Deserialize(strViewState));
}
}
そして、あなたはこのようにそれを呼び出すことができます。
DebugViewState.SeeViewState(Request.Form("__VIEWSTATE"), "c:\temp\viewstate.txt")
詳細はこちらのリンクを参照してください:
http://www.xoc.net/works/tips/viewstate.asp
は本当に私ができるように、個々のViewStateのメンバにアクセスする方法はありませんアプリケーション変数またはセッション変数を使用していますか? –