Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / ErrorFormatterPage.cs / 1305376 / ErrorFormatterPage.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * This is a page class that is used for adaptive error formatting for mobile * devices. * * NOTE: We explicitly override the state management methods because if the * normal page class is used, an exception is thrown for mobile devices. * For example, WmlPageAdapter uses SessionPageStatePersister * for persisting view state. SessionPageStatePersister requires * Context.Session to be available. Otherwise, it would throw in the * constructor. However, when an error occurred, Context.Session is * removed by SessionStateModule before the error is being formatted and * rendered. Hence the methods are overridden below and ignored to avoid * the exception since there is no need to persist any view state for the * adaptive error page which is created dynamically during error handling. * * Copyright (c) 2003 Microsoft Corporation */ namespace System.Web.UI { internal sealed class ErrorFormatterPage: Page { protected internal override void SavePageStateToPersistenceMedium(Object viewState) { // Override and ignore. No need to save view state for this page. } protected internal override Object LoadPageStateFromPersistenceMedium() { // Override and ignore. No view state to load for this page. return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * This is a page class that is used for adaptive error formatting for mobile * devices. * * NOTE: We explicitly override the state management methods because if the * normal page class is used, an exception is thrown for mobile devices. * For example, WmlPageAdapter uses SessionPageStatePersister * for persisting view state. SessionPageStatePersister requires * Context.Session to be available. Otherwise, it would throw in the * constructor. However, when an error occurred, Context.Session is * removed by SessionStateModule before the error is being formatted and * rendered. Hence the methods are overridden below and ignored to avoid * the exception since there is no need to persist any view state for the * adaptive error page which is created dynamically during error handling. * * Copyright (c) 2003 Microsoft Corporation */ namespace System.Web.UI { internal sealed class ErrorFormatterPage: Page { protected internal override void SavePageStateToPersistenceMedium(Object viewState) { // Override and ignore. No need to save view state for this page. } protected internal override Object LoadPageStateFromPersistenceMedium() { // Override and ignore. No view state to load for this page. return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PackageProperties.cs
- Typography.cs
- ListViewCommandEventArgs.cs
- TypeDescriptionProviderAttribute.cs
- RadioButtonList.cs
- QueryContinueDragEvent.cs
- PropertyPath.cs
- CounterSample.cs
- CodeObject.cs
- typedescriptorpermission.cs
- TextRunProperties.cs
- GenericTextProperties.cs
- PermissionListSet.cs
- AdornerLayer.cs
- PipeSecurity.cs
- GridSplitterAutomationPeer.cs
- Bidi.cs
- RepeatInfo.cs
- WorkItem.cs
- DataGridHeaderBorder.cs
- NGCPageContentCollectionSerializerAsync.cs
- StringPropertyBuilder.cs
- controlskin.cs
- SurrogateEncoder.cs
- BamlTreeNode.cs
- CngKeyBlobFormat.cs
- ResourceDescriptionAttribute.cs
- CorrelationManager.cs
- PieceNameHelper.cs
- DataGridViewColumnHeaderCell.cs
- CompModSwitches.cs
- CommentAction.cs
- ImageAnimator.cs
- IssuedTokenClientCredential.cs
- DescriptionAttribute.cs
- LayoutInformation.cs
- FlowchartDesigner.xaml.cs
- ButtonChrome.cs
- SocketStream.cs
- ManipulationCompletedEventArgs.cs
- FileInfo.cs
- Rotation3D.cs
- Menu.cs
- DependencyObjectPropertyDescriptor.cs
- ValidateNames.cs
- _LocalDataStoreMgr.cs
- DataKeyArray.cs
- BitHelper.cs
- LogicalExpr.cs
- XPathQilFactory.cs
- ViewGenerator.cs
- WebPartDisplayMode.cs
- DataGridViewHitTestInfo.cs
- X509Certificate.cs
- GradientStop.cs
- BitArray.cs
- MemberHolder.cs
- SetStoryboardSpeedRatio.cs
- VirtualizingStackPanel.cs
- SiteMapSection.cs
- ObjectStateManager.cs
- Source.cs
- LeftCellWrapper.cs
- UserControl.cs
- PreloadedPackages.cs
- Size.cs
- XXXInfos.cs
- ConnectionPoint.cs
- EntityDataReader.cs
- SmiContext.cs
- PartialCachingControl.cs
- ClientTarget.cs
- ConversionContext.cs
- Size.cs
- CacheDependency.cs
- QilFunction.cs
- Matrix.cs
- ObjectDataSourceMethodEventArgs.cs
- SqlDataSourceQueryEditor.cs
- RC2.cs
- Documentation.cs
- EncoderParameters.cs
- UrlRoutingModule.cs
- SqlDataSourceWizardForm.cs
- PeoplePickerWrapper.cs
- SourceLineInfo.cs
- xml.cs
- XamlFrame.cs
- UIPermission.cs
- Array.cs
- ElapsedEventArgs.cs
- ArrangedElement.cs
- Range.cs
- StorageEntityTypeMapping.cs
- BindableAttribute.cs
- QilPatternFactory.cs
- DbConnectionPoolCounters.cs
- ThreadInterruptedException.cs
- UnsafeNativeMethods.cs
- TimeSpanValidator.cs