Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- CalendarModeChangedEventArgs.cs
- SmiRecordBuffer.cs
- ChannelServices.cs
- WindowsIPAddress.cs
- ProjectionQueryOptionExpression.cs
- FileNotFoundException.cs
- ThaiBuddhistCalendar.cs
- DataSourceHelper.cs
- SystemWebSectionGroup.cs
- AppLevelCompilationSectionCache.cs
- ArrayConverter.cs
- AnimationStorage.cs
- ArgIterator.cs
- DiagnosticSection.cs
- BindingGroup.cs
- SafeSystemMetrics.cs
- ErrorHandler.cs
- SqlCrossApplyToCrossJoin.cs
- UrlPath.cs
- EncodingTable.cs
- ContextStaticAttribute.cs
- DBDataPermission.cs
- XmlDataSourceNodeDescriptor.cs
- WebPartZone.cs
- safelink.cs
- GuidConverter.cs
- UserPreferenceChangingEventArgs.cs
- NameSpaceExtractor.cs
- DataGridItem.cs
- ScrollEvent.cs
- TextReader.cs
- QilExpression.cs
- Configuration.cs
- WpfXamlType.cs
- DocumentGrid.cs
- TypeUtil.cs
- DockingAttribute.cs
- ServiceErrorHandler.cs
- RadioButton.cs
- MetricEntry.cs
- StrokeNodeOperations.cs
- ConfigurationElementProperty.cs
- ToolStripStatusLabel.cs
- BufferBuilder.cs
- ServiceMemoryGates.cs
- XmlSerializerFactory.cs
- ObjectListComponentEditor.cs
- RSAPKCS1SignatureDeformatter.cs
- UserInitiatedRoutedEventPermission.cs
- XmlReader.cs
- Inline.cs
- HistoryEventArgs.cs
- InfoCardServiceInstallComponent.cs
- OdbcConnectionString.cs
- HtmlLink.cs
- SystemTcpConnection.cs
- RawStylusSystemGestureInputReport.cs
- PartialClassGenerationTask.cs
- WmlLiteralTextAdapter.cs
- RequestContext.cs
- CultureInfoConverter.cs
- DetailsView.cs
- PackageFilter.cs
- BrushValueSerializer.cs
- DataKey.cs
- SoundPlayer.cs
- storepermissionattribute.cs
- MasterPageBuildProvider.cs
- AuthenticationConfig.cs
- LineServicesRun.cs
- StateChangeEvent.cs
- Timer.cs
- UnsettableComboBox.cs
- ArrangedElement.cs
- SafeRightsManagementHandle.cs
- QilPatternFactory.cs
- MetadataArtifactLoader.cs
- AttributeCollection.cs
- HttpAsyncResult.cs
- XmlElementCollection.cs
- OAVariantLib.cs
- RMEnrollmentPage1.cs
- BindValidationContext.cs
- FlowLayout.cs
- SoapEnvelopeProcessingElement.cs
- _StreamFramer.cs
- CancelEventArgs.cs
- RoleGroup.cs
- Viewport3DVisual.cs
- InstanceNotReadyException.cs
- ObjectPersistData.cs
- ThicknessAnimationUsingKeyFrames.cs
- ListItemParagraph.cs
- UnmanagedMarshal.cs
- TextClipboardData.cs
- BypassElementCollection.cs
- PageCatalogPart.cs
- SQLInt64Storage.cs
- WebPartRestoreVerb.cs
- RuleCache.cs