Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / ErrorFormatterPage.cs / 1 / 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
- SerializationSectionGroup.cs
- ValueTypeFixupInfo.cs
- EventSourceCreationData.cs
- RegisteredHiddenField.cs
- _SslSessionsCache.cs
- XmlPropertyBag.cs
- selecteditemcollection.cs
- grammarelement.cs
- TransactionBridge.cs
- ImageSource.cs
- ScopelessEnumAttribute.cs
- InteropBitmapSource.cs
- AppSecurityManager.cs
- EnumUnknown.cs
- ListControl.cs
- BaseComponentEditor.cs
- WinFormsUtils.cs
- AnnotationResourceCollection.cs
- ConstructorBuilder.cs
- MaterialCollection.cs
- TreeNodeEventArgs.cs
- GridViewUpdateEventArgs.cs
- MLangCodePageEncoding.cs
- TreeView.cs
- DeferredTextReference.cs
- WindowsEditBox.cs
- CopyAttributesAction.cs
- DataGridViewElement.cs
- Cursor.cs
- odbcmetadatafactory.cs
- CommonDialog.cs
- ObjectSecurityT.cs
- PageBuildProvider.cs
- UnsafeNativeMethodsPenimc.cs
- Header.cs
- FixedSOMGroup.cs
- InitializerFacet.cs
- BufferedReceiveManager.cs
- SoapFaultCodes.cs
- TaiwanCalendar.cs
- ControlOperationBehavior.cs
- BidPrivateBase.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- TableCellAutomationPeer.cs
- BindingList.cs
- FileDialogCustomPlacesCollection.cs
- EditBehavior.cs
- TreeWalker.cs
- OperationBehaviorAttribute.cs
- MethodToken.cs
- RepeaterItemCollection.cs
- MailMessageEventArgs.cs
- BindingFormattingDialog.cs
- ContextMenuAutomationPeer.cs
- TypeLibConverter.cs
- CryptoProvider.cs
- RecognizedWordUnit.cs
- Emitter.cs
- SafeTokenHandle.cs
- SqlConnectionManager.cs
- GeometryCollection.cs
- DataViewListener.cs
- RectAnimation.cs
- HtmlInputButton.cs
- BitSet.cs
- TokenBasedSetEnumerator.cs
- ButtonBase.cs
- SqlFormatter.cs
- ProcessProtocolHandler.cs
- ValidationHelper.cs
- Model3DCollection.cs
- XmlSigningNodeWriter.cs
- RemoteWebConfigurationHostStream.cs
- RecognizedAudio.cs
- PageRouteHandler.cs
- QilScopedVisitor.cs
- XPathParser.cs
- Interlocked.cs
- XmlNavigatorFilter.cs
- SvcMapFileSerializer.cs
- BlurEffect.cs
- TextBreakpoint.cs
- UIntPtr.cs
- WasHttpModulesInstallComponent.cs
- VScrollBar.cs
- SweepDirectionValidation.cs
- PersonalizableAttribute.cs
- DataExpression.cs
- AvTraceDetails.cs
- DecoderFallbackWithFailureFlag.cs
- BasicBrowserDialog.designer.cs
- WebBaseEventKeyComparer.cs
- ISAPIApplicationHost.cs
- CheckBoxDesigner.cs
- WindowsRichEdit.cs
- ToolStripOverflowButton.cs
- ScrollPattern.cs
- NavigationCommands.cs
- EncoderFallback.cs
- safelinkcollection.cs