提交 6a5b2382 编写于 作者: M Marek Habersack

[asp.net] HiddenFieldPageStatePersister must not attempt to deserialize an empty/null string

上级 78ff804e
......@@ -53,11 +53,14 @@ namespace System.Web.UI
return;
}
#endif
string rawViewState = Page.RawViewState;
IStateFormatter formatter = StateFormatter;
Pair pair = formatter.Deserialize (Page.RawViewState) as Pair;
if (pair != null) {
ViewState = pair.First;
ControlState = pair.Second;
if (!String.IsNullOrEmpty (rawViewState)) {
Pair pair = formatter.Deserialize (rawViewState) as Pair;
if (pair != null) {
ViewState = pair.First;
ControlState = pair.Second;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册