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
- HtmlFormWrapper.cs
- GeneratedCodeAttribute.cs
- StructuredTypeEmitter.cs
- ComPlusServiceHost.cs
- DataGridViewHeaderCell.cs
- OracleTransaction.cs
- SortedDictionary.cs
- ModifierKeysValueSerializer.cs
- GlobalItem.cs
- TypeConverters.cs
- NativeMethods.cs
- AsyncParams.cs
- ConstNode.cs
- ScriptResourceAttribute.cs
- InlineCategoriesDocument.cs
- XsltFunctions.cs
- SortableBindingList.cs
- DataTrigger.cs
- SqlDataSourceQueryEditor.cs
- TextViewSelectionProcessor.cs
- TagPrefixCollection.cs
- UserControlBuildProvider.cs
- RefExpr.cs
- AdapterUtil.cs
- BigInt.cs
- MimePart.cs
- ConfigurationPermission.cs
- CapabilitiesState.cs
- ListContractAdapter.cs
- StyleCollection.cs
- XslCompiledTransform.cs
- RotationValidation.cs
- UnsafeNativeMethods.cs
- PromptBuilder.cs
- StrongName.cs
- SystemDropShadowChrome.cs
- CustomSignedXml.cs
- StructuralCache.cs
- Scripts.cs
- ContainerControl.cs
- ProvidersHelper.cs
- BaseTypeViewSchema.cs
- TypeSemantics.cs
- CorruptStoreException.cs
- ObjectDataSourceFilteringEventArgs.cs
- FontInfo.cs
- StorageMappingItemCollection.cs
- PrimitiveSchema.cs
- DomainConstraint.cs
- TypeSystemHelpers.cs
- SingleObjectCollection.cs
- JavaScriptSerializer.cs
- AlignmentYValidation.cs
- HtmlLinkAdapter.cs
- codemethodreferenceexpression.cs
- CompilationRelaxations.cs
- ApplicationFileCodeDomTreeGenerator.cs
- MaterialGroup.cs
- DelegatingTypeDescriptionProvider.cs
- EntityTypeBase.cs
- ReservationNotFoundException.cs
- CollectionViewGroupRoot.cs
- ValidatorCompatibilityHelper.cs
- ClientApiGenerator.cs
- CompositionAdorner.cs
- AddInEnvironment.cs
- InsufficientMemoryException.cs
- PackWebResponse.cs
- PathFigureCollection.cs
- MetabaseServerConfig.cs
- StaticContext.cs
- GroupBox.cs
- CellQuery.cs
- RuleSettingsCollection.cs
- TcpAppDomainProtocolHandler.cs
- SqlMethodAttribute.cs
- Message.cs
- WebPartChrome.cs
- AddInContractAttribute.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- ExecutionEngineException.cs
- HttpServerVarsCollection.cs
- ConditionValidator.cs
- WsdlContractConversionContext.cs
- FtpCachePolicyElement.cs
- ForEachDesigner.xaml.cs
- HostedElements.cs
- TCPClient.cs
- ListDictionaryInternal.cs
- WindowsPen.cs
- _IPv4Address.cs
- DesignParameter.cs
- ByteAnimationUsingKeyFrames.cs
- GlobalEventManager.cs
- ToolStripEditorManager.cs
- BorderSidesEditor.cs
- CustomErrorCollection.cs
- ConnectionInterfaceCollection.cs
- BoolLiteral.cs
- TranslateTransform.cs