Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MexTcpBindingElement.cs
- SplineKeyFrames.cs
- XmlTextAttribute.cs
- TextStore.cs
- XmlDeclaration.cs
- SineEase.cs
- WaitHandleCannotBeOpenedException.cs
- CrossAppDomainChannel.cs
- PropertyOverridesTypeEditor.cs
- HandlerWithFactory.cs
- RuntimeEnvironment.cs
- _TimerThread.cs
- WindowsFont.cs
- EntityDataSourceEntitySetNameItem.cs
- ModelItemCollection.cs
- MultiTouchSystemGestureLogic.cs
- AttributeTableBuilder.cs
- EngineSite.cs
- InternalCache.cs
- DoubleCollectionConverter.cs
- ToolStripPanelRenderEventArgs.cs
- SchemeSettingElement.cs
- ExpressionBuilder.cs
- DelegateTypeInfo.cs
- CollectionExtensions.cs
- GacUtil.cs
- ReferencedType.cs
- ForeignConstraint.cs
- ControlValuePropertyAttribute.cs
- WriteFileContext.cs
- HtmlFormWrapper.cs
- NamespaceCollection.cs
- SpecularMaterial.cs
- CommandEventArgs.cs
- CharConverter.cs
- TargetControlTypeAttribute.cs
- StorageComplexTypeMapping.cs
- DataTableMappingCollection.cs
- XsdDuration.cs
- PathFigureCollection.cs
- BufferModeSettings.cs
- CatalogZoneBase.cs
- AutomationProperties.cs
- Solver.cs
- EDesignUtil.cs
- RoleManagerSection.cs
- MessageQueuePermissionEntryCollection.cs
- RTTrackingProfile.cs
- WebConfigurationFileMap.cs
- NumericUpDownAccelerationCollection.cs
- CacheForPrimitiveTypes.cs
- MimeImporter.cs
- DataGridRowsPresenter.cs
- Byte.cs
- MergePropertyDescriptor.cs
- BmpBitmapEncoder.cs
- XmlUtil.cs
- DynamicRenderer.cs
- AxisAngleRotation3D.cs
- InvalidAsynchronousStateException.cs
- WasNotInstalledException.cs
- MarkupCompilePass2.cs
- SystemIPv4InterfaceProperties.cs
- DesignerVerb.cs
- Triangle.cs
- StorageMappingItemCollection.cs
- NameObjectCollectionBase.cs
- CollectionChangeEventArgs.cs
- processwaithandle.cs
- SyntaxCheck.cs
- ConfigXmlAttribute.cs
- Queue.cs
- ErasingStroke.cs
- DataPagerFieldCollection.cs
- PrimitiveXmlSerializers.cs
- OpCopier.cs
- ConnectivityStatus.cs
- ThemeInfoAttribute.cs
- AutoCompleteStringCollection.cs
- RelationshipEndCollection.cs
- TagNameToTypeMapper.cs
- SqlFileStream.cs
- CodeAccessSecurityEngine.cs
- RIPEMD160.cs
- XmlSiteMapProvider.cs
- DbConnectionPool.cs
- OleDbDataReader.cs
- XmlSerializationReader.cs
- ContainerAction.cs
- TransformerInfo.cs
- EventWaitHandle.cs
- FlowNode.cs
- ToolStripLocationCancelEventArgs.cs
- ColumnMapTranslator.cs
- TemplateControlBuildProvider.cs
- JoinElimination.cs
- GroupBox.cs
- TaskResultSetter.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- MonitorWrapper.cs