Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartRestoreVerb.cs / 1 / WebPartRestoreVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartRestoreVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartRestoreVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartRestoreVerb_Text); } return _defaultText; } } // Properties must look at viewstate directly instead of the property in the base class, // so we can distinguish between an unset property and a property set to String.Empty. [ WebSysDefaultValue(SR.WebPartRestoreVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartRestoreVerb_Text) ] public override string Text { get { object o = ViewState["Text"]; return (o == null) ? DefaultText : (string)o; } set { ViewState["Text"] = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartRestoreVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartRestoreVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartRestoreVerb_Text); } return _defaultText; } } // Properties must look at viewstate directly instead of the property in the base class, // so we can distinguish between an unset property and a property set to String.Empty. [ WebSysDefaultValue(SR.WebPartRestoreVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartRestoreVerb_Text) ] public override string Text { get { object o = ViewState["Text"]; return (o == null) ? DefaultText : (string)o; } set { ViewState["Text"] = value; } } } } // 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
- DeploymentSectionCache.cs
- GlyphCache.cs
- CryptoApi.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- TemplateKey.cs
- XPathParser.cs
- EndpointBehaviorElement.cs
- ExtractorMetadata.cs
- ComIntegrationManifestGenerator.cs
- EllipseGeometry.cs
- DrawingAttributeSerializer.cs
- XmlObjectSerializerReadContextComplex.cs
- DialogResultConverter.cs
- StackSpiller.cs
- DelayedRegex.cs
- GeometryCombineModeValidation.cs
- SvcMapFileLoader.cs
- Rect3D.cs
- TriState.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- CodePropertyReferenceExpression.cs
- ThreadInterruptedException.cs
- TreeNodeStyleCollection.cs
- ReadWriteSpinLock.cs
- Unit.cs
- WebBodyFormatMessageProperty.cs
- MimeTypeAttribute.cs
- _IPv4Address.cs
- XPathNode.cs
- DurableEnlistmentState.cs
- ResXResourceWriter.cs
- MimeXmlReflector.cs
- wpf-etw.cs
- HttpModuleAction.cs
- MatchingStyle.cs
- MergeLocalizationDirectives.cs
- AggregateException.cs
- HtmlMeta.cs
- _AuthenticationState.cs
- WpfSharedXamlSchemaContext.cs
- NodeInfo.cs
- QueryIntervalOp.cs
- tibetanshape.cs
- RuleElement.cs
- DriveInfo.cs
- HtmlInputControl.cs
- DocumentSchemaValidator.cs
- COM2PropertyDescriptor.cs
- AddingNewEventArgs.cs
- ArgumentDesigner.xaml.cs
- ConfigurationStrings.cs
- UndoUnit.cs
- SafeBitVector32.cs
- EnumerableRowCollectionExtensions.cs
- RoleManagerModule.cs
- CellTreeNode.cs
- ToolStripDropDownItemDesigner.cs
- ReferentialConstraintRoleElement.cs
- SupportedAddressingMode.cs
- NumericUpDownAccelerationCollection.cs
- GraphicsContainer.cs
- RegexNode.cs
- StorageComplexTypeMapping.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- EdmItemError.cs
- DataObjectPastingEventArgs.cs
- precedingquery.cs
- FormViewDeletedEventArgs.cs
- ProvidersHelper.cs
- _DigestClient.cs
- DbXmlEnabledProviderManifest.cs
- CompiledQueryCacheKey.cs
- smtppermission.cs
- MethodExpr.cs
- ObjectIDGenerator.cs
- AssociatedControlConverter.cs
- PostBackOptions.cs
- XMLUtil.cs
- Int16Storage.cs
- Screen.cs
- CodeTryCatchFinallyStatement.cs
- StoreContentChangedEventArgs.cs
- AppLevelCompilationSectionCache.cs
- ProfileService.cs
- AssociationType.cs
- TypeConverterMarkupExtension.cs
- PasswordDeriveBytes.cs
- DeferredSelectedIndexReference.cs
- HttpRuntimeSection.cs
- UnsafeNativeMethods.cs
- XhtmlBasicSelectionListAdapter.cs
- ImageBrush.cs
- MergePropertyDescriptor.cs
- FileLevelControlBuilderAttribute.cs
- ReachPageContentCollectionSerializer.cs
- Overlapped.cs
- PopOutPanel.cs
- BackgroundFormatInfo.cs
- BaseDataList.cs
- DbConnectionPoolCounters.cs