还原viewstate

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKLTE2MjY5MTY1NQ9kFgICAw9kFgICAQ8PFgIeBFRleHQFDEhlbGxv

IFdvcmxkIWRkZPsbiNOyNAufEt7OvNIbVYcGWHqf" />

C#代码:

string viewStateString = Request["__VIEWSTATE"];

byte[] stringBytes = Convert.FromBase64String(viewStateString);

string decodedViewState = System.Text.Encoding.ASCII.GetString(stringBytes);  

lbl.Text = decodedViewState;

posted @ 2009-10-29 10:47  wispzone  阅读(217)  评论(0编辑  收藏  举报