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
- DiagnosticEventProvider.cs
- PageTheme.cs
- SettingsProperty.cs
- TemplateBuilder.cs
- coordinatorfactory.cs
- EntityDataReader.cs
- ListSortDescriptionCollection.cs
- HandleCollector.cs
- DocumentApplicationJournalEntry.cs
- DSACryptoServiceProvider.cs
- ToolBar.cs
- DirectoryInfo.cs
- CurrencyWrapper.cs
- DBNull.cs
- XmlAnyElementAttributes.cs
- XmlILConstructAnalyzer.cs
- DbConnectionFactory.cs
- CompositeClientFormatter.cs
- ConfigurationPropertyAttribute.cs
- CodeAccessSecurityEngine.cs
- AssemblySettingAttributes.cs
- AppSettingsReader.cs
- ExpressionNormalizer.cs
- DataComponentNameHandler.cs
- UrlMappingsModule.cs
- LineBreak.cs
- PreviewPageInfo.cs
- MarkupCompilePass2.cs
- AsyncParams.cs
- QuaternionIndependentAnimationStorage.cs
- BindableTemplateBuilder.cs
- DoubleCollectionValueSerializer.cs
- StringToken.cs
- SendMailErrorEventArgs.cs
- ProcessModule.cs
- SQLDateTimeStorage.cs
- ManipulationDevice.cs
- PlaceHolder.cs
- TextDecorationCollectionConverter.cs
- CacheMode.cs
- DelegatedStream.cs
- fixedPageContentExtractor.cs
- ToolStripItemDesigner.cs
- CombinedGeometry.cs
- AttributeEmitter.cs
- ColumnHeader.cs
- StreamSecurityUpgradeProvider.cs
- DashStyles.cs
- ExpressionQuoter.cs
- DrawListViewSubItemEventArgs.cs
- InvariantComparer.cs
- TypeFieldSchema.cs
- QuotedPairReader.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ControlHelper.cs
- AuthenticatedStream.cs
- ContentIterators.cs
- DataGridColumnHeaderAutomationPeer.cs
- Column.cs
- SchemaMapping.cs
- MediaPlayerState.cs
- AppDomainShutdownMonitor.cs
- SmtpClient.cs
- ListenerConstants.cs
- Int16Converter.cs
- VisualState.cs
- TextChangedEventArgs.cs
- DPTypeDescriptorContext.cs
- EventEntry.cs
- DataControlImageButton.cs
- ConfigurationLocation.cs
- DataSourceXmlSerializer.cs
- ServiceSecurityAuditBehavior.cs
- CursorInteropHelper.cs
- Cell.cs
- Subset.cs
- ByteRangeDownloader.cs
- SerializerWriterEventHandlers.cs
- StringBlob.cs
- StructuredProperty.cs
- MatrixTransform.cs
- Pair.cs
- PlanCompilerUtil.cs
- ReceiveActivityDesignerTheme.cs
- StickyNoteContentControl.cs
- OciHandle.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- TemplateColumn.cs
- IntPtr.cs
- TemplatePropertyEntry.cs
- MatrixAnimationUsingKeyFrames.cs
- CompilationUnit.cs
- TableLayoutPanelCellPosition.cs
- MailMessageEventArgs.cs
- GraphicsContainer.cs
- BuildProviderCollection.cs
- SafePointer.cs
- XMLDiffLoader.cs
- MergeFailedEvent.cs
- ExecutionScope.cs