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
- MultitargetingHelpers.cs
- UInt16Converter.cs
- DisposableCollectionWrapper.cs
- InternalMappingException.cs
- DbExpressionVisitor.cs
- DbConnectionPoolGroupProviderInfo.cs
- CssTextWriter.cs
- FormViewDeletedEventArgs.cs
- WindowsAuthenticationModule.cs
- SystemGatewayIPAddressInformation.cs
- BitmapEffectrendercontext.cs
- InfoCardBaseException.cs
- ArgumentException.cs
- CodeBinaryOperatorExpression.cs
- WhileDesigner.cs
- SafeLibraryHandle.cs
- SortAction.cs
- DesignerMetadata.cs
- ProviderManager.cs
- MemoryPressure.cs
- SQLBoolean.cs
- EntityDataSourceEntityTypeFilterItem.cs
- SectionUpdates.cs
- xmlsaver.cs
- EntityDataSourceUtil.cs
- ClosableStream.cs
- MultipleViewPattern.cs
- ChannelFactoryRefCache.cs
- BigInt.cs
- TextBox.cs
- ErrorRuntimeConfig.cs
- PerformanceCounters.cs
- PropertyIDSet.cs
- TraceListeners.cs
- SelectManyQueryOperator.cs
- QueryValue.cs
- _Semaphore.cs
- HandleCollector.cs
- AgileSafeNativeMemoryHandle.cs
- PackageRelationship.cs
- ADConnectionHelper.cs
- ToggleProviderWrapper.cs
- XmlMembersMapping.cs
- codemethodreferenceexpression.cs
- Imaging.cs
- CompoundFileStorageReference.cs
- SortKey.cs
- BindingContext.cs
- DesignerCategoryAttribute.cs
- _UriSyntax.cs
- IFlowDocumentViewer.cs
- PointF.cs
- DataColumnSelectionConverter.cs
- HitTestResult.cs
- TypeForwardedToAttribute.cs
- TheQuery.cs
- VisualCollection.cs
- ObjectComplexPropertyMapping.cs
- TextInfo.cs
- Preprocessor.cs
- RegularExpressionValidator.cs
- Image.cs
- NetworkCredential.cs
- TreeWalkHelper.cs
- ClientTarget.cs
- UrlMappingsModule.cs
- DBProviderConfigurationHandler.cs
- XPathNode.cs
- XslException.cs
- InstanceNotFoundException.cs
- VisualProxy.cs
- OleDbRowUpdatedEvent.cs
- PrintDialogException.cs
- MemberAssignment.cs
- SymbolTable.cs
- SqlServer2KCompatibilityCheck.cs
- InheritanceUI.cs
- WebBrowserNavigatingEventHandler.cs
- SafeFileMappingHandle.cs
- LabelLiteral.cs
- BitmapCodecInfo.cs
- PageAdapter.cs
- StatusBarPanelClickEvent.cs
- WebPartEditorCancelVerb.cs
- SHA256.cs
- CollectionViewGroupInternal.cs
- DataControlPagerLinkButton.cs
- DesignerWidgets.cs
- TransportDefaults.cs
- ISO2022Encoding.cs
- Math.cs
- ReachFixedPageSerializerAsync.cs
- ObjectDataProvider.cs
- HtmlLink.cs
- LayoutDump.cs
- SequenceFullException.cs
- httpstaticobjectscollection.cs
- TypeSemantics.cs
- ReversePositionQuery.cs
- DiagnosticTraceSource.cs