Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / HiddenFieldPageStatePersister.cs / 1 / HiddenFieldPageStatePersister.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections; using System.Collections.Specialized; using System.IO; using System.Text; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HiddenFieldPageStatePersister : PageStatePersister { public HiddenFieldPageStatePersister(Page page) : base (page) { } public override void Load() { NameValueCollection requestValueCollection = Page.RequestValueCollection; if (requestValueCollection == null) { return; } string viewStateString = null; try { viewStateString = Page.RequestViewStateString; // VSWhidbey 160556 if (!String.IsNullOrEmpty(viewStateString)) { Pair combinedState = (Pair)Util.DeserializeWithAssert(StateFormatter, viewStateString); ViewState = combinedState.First; ControlState = combinedState.Second; } } catch (Exception e) { // throw if this is a wrapped ViewStateException -- mac validation failed if (e.InnerException is ViewStateException) { throw; } ViewStateException.ThrowViewStateError(e, viewStateString); } } ////// To be supplied. /// public override void Save() { if (ViewState != null || ControlState != null) { Page.ClientState = Util.SerializeWithAssert(StateFormatter, new Pair(ViewState, ControlState)); } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CallSite.cs
- _IPv6Address.cs
- VisualState.cs
- HttpCacheVaryByContentEncodings.cs
- WaveHeader.cs
- DES.cs
- FreezableCollection.cs
- ResetableIterator.cs
- ToolStripOverflow.cs
- XmlDocument.cs
- IIS7WorkerRequest.cs
- RuleSetCollection.cs
- UIAgentCrashedException.cs
- FeatureManager.cs
- ProtocolsConfiguration.cs
- Content.cs
- HGlobalSafeHandle.cs
- Binding.cs
- DataGridViewColumnCollection.cs
- ConfigXmlCDataSection.cs
- InstallerTypeAttribute.cs
- Region.cs
- LingerOption.cs
- PresentationSource.cs
- OdbcPermission.cs
- BitmapEffectvisualstate.cs
- DBCommandBuilder.cs
- MultiTrigger.cs
- LinqDataSourceView.cs
- ListView.cs
- PenLineJoinValidation.cs
- HostingEnvironmentWrapper.cs
- MetadataItemSerializer.cs
- ConvertEvent.cs
- DataServiceBuildProvider.cs
- Range.cs
- InstanceHandleConflictException.cs
- Encoding.cs
- CodeTypeDelegate.cs
- CatalogZoneAutoFormat.cs
- AudioLevelUpdatedEventArgs.cs
- ProviderManager.cs
- HwndSourceParameters.cs
- ExpandCollapseProviderWrapper.cs
- MenuScrollingVisibilityConverter.cs
- ChangeTracker.cs
- KeyInfo.cs
- CharacterString.cs
- ApplicationServiceManager.cs
- DecoderNLS.cs
- DataPager.cs
- __ComObject.cs
- TableRow.cs
- ProfileProvider.cs
- SafePointer.cs
- ItemsControl.cs
- SyndicationContent.cs
- BasicHttpSecurityElement.cs
- WorkerProcess.cs
- COM2FontConverter.cs
- HttpHandlerAction.cs
- Asn1IntegerConverter.cs
- OperatorExpressions.cs
- WebException.cs
- ExpressionVisitorHelpers.cs
- FixedHyperLink.cs
- SafeEventHandle.cs
- DelimitedListTraceListener.cs
- EncodingTable.cs
- ListView.cs
- CodeArgumentReferenceExpression.cs
- QilTernary.cs
- RadioButton.cs
- WindowInteropHelper.cs
- ScriptingRoleServiceSection.cs
- WorkerRequest.cs
- FormattedTextSymbols.cs
- RegexWorker.cs
- FieldToken.cs
- SendMailErrorEventArgs.cs
- _UriSyntax.cs
- UserControlAutomationPeer.cs
- ToolStripContextMenu.cs
- NavigationWindow.cs
- DataGridViewRowPrePaintEventArgs.cs
- BooleanAnimationUsingKeyFrames.cs
- FixedSOMPage.cs
- FormViewDesigner.cs
- WindowsAuthenticationModule.cs
- LeafCellTreeNode.cs
- Odbc32.cs
- NativeMethods.cs
- indexingfiltermarshaler.cs
- XmlSerializationWriter.cs
- CodeIdentifier.cs
- ShaderEffect.cs
- PropertyExpression.cs
- FieldToken.cs
- Constraint.cs
- WebPartActionVerb.cs