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
- CodeDirectiveCollection.cs
- TTSEvent.cs
- WebPartEventArgs.cs
- Panel.cs
- ClientScriptManager.cs
- ReadOnlyPropertyMetadata.cs
- CustomLineCap.cs
- UidManager.cs
- ConfigXmlElement.cs
- XmlWellformedWriter.cs
- HtmlElementCollection.cs
- TraceRecords.cs
- ConfigurationManagerInternal.cs
- codemethodreferenceexpression.cs
- DesignerTextWriter.cs
- oledbconnectionstring.cs
- StateChangeEvent.cs
- ResourceDefaultValueAttribute.cs
- SmtpFailedRecipientException.cs
- CustomTypeDescriptor.cs
- MSG.cs
- ControlValuePropertyAttribute.cs
- InstancePersistenceCommandException.cs
- EmbeddedObject.cs
- Thumb.cs
- XamlToRtfParser.cs
- CompilerInfo.cs
- StrongNameSignatureInformation.cs
- JournalEntry.cs
- RoleService.cs
- DurationConverter.cs
- PointAnimation.cs
- IteratorFilter.cs
- OLEDB_Enum.cs
- FlowDocumentReader.cs
- PrimarySelectionGlyph.cs
- InternalControlCollection.cs
- DataShape.cs
- SQLChars.cs
- Paragraph.cs
- TagElement.cs
- ItemList.cs
- SqlXml.cs
- Brushes.cs
- FormViewModeEventArgs.cs
- TypeBuilderInstantiation.cs
- CompiledQuery.cs
- SplitterPanel.cs
- InputProcessorProfiles.cs
- StaticSiteMapProvider.cs
- DocumentEventArgs.cs
- ListBoxDesigner.cs
- RawStylusSystemGestureInputReport.cs
- View.cs
- HyperLink.cs
- SymbolTable.cs
- ProjectionAnalyzer.cs
- DisposableCollectionWrapper.cs
- safex509handles.cs
- MultiBinding.cs
- SerialPort.cs
- TemplateBindingExtensionConverter.cs
- DataGridViewCellMouseEventArgs.cs
- TdsParserSafeHandles.cs
- ArraySortHelper.cs
- DataViewSettingCollection.cs
- EntityDataSourceSelectingEventArgs.cs
- TextServicesDisplayAttributePropertyRanges.cs
- DataServiceQueryException.cs
- DynamicILGenerator.cs
- SqlClientFactory.cs
- HttpHandlerActionCollection.cs
- DataGridViewCellEventArgs.cs
- IdentityModelStringsVersion1.cs
- UnsafeNativeMethods.cs
- Attribute.cs
- CacheChildrenQuery.cs
- Constant.cs
- AccessorTable.cs
- TagElement.cs
- ContainerAction.cs
- assemblycache.cs
- StoreAnnotationsMap.cs
- RC2CryptoServiceProvider.cs
- SettingsPropertyNotFoundException.cs
- VisualTransition.cs
- WebMessageBodyStyleHelper.cs
- WizardPanel.cs
- XsdValidatingReader.cs
- XmlSchemaGroup.cs
- CodeMemberMethod.cs
- Canvas.cs
- TypeResolver.cs
- SmtpTransport.cs
- NameNode.cs
- ValidationPropertyAttribute.cs
- SQLUtility.cs
- FixedHighlight.cs
- ConstantExpression.cs
- MsdtcWrapper.cs