Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartRestoreVerb.cs / 1305376 / 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
- FieldToken.cs
- SessionSwitchEventArgs.cs
- AsymmetricKeyExchangeDeformatter.cs
- CustomCredentialPolicy.cs
- DbProviderConfigurationHandler.cs
- RequestTimeoutManager.cs
- UnmanagedMemoryStream.cs
- Table.cs
- Form.cs
- DataRecord.cs
- LocatorGroup.cs
- util.cs
- DBAsyncResult.cs
- TreeNodeStyleCollection.cs
- MissingFieldException.cs
- XmlSchemaInfo.cs
- PagedDataSource.cs
- GridPatternIdentifiers.cs
- ScrollChrome.cs
- SqlServices.cs
- DataSourceControl.cs
- PersistenceTask.cs
- TrustSection.cs
- PropertyEmitterBase.cs
- XmlDictionaryReader.cs
- DataList.cs
- HtmlAnchor.cs
- SubstitutionDesigner.cs
- CellTreeNode.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ResourceDisplayNameAttribute.cs
- AspNetHostingPermission.cs
- QueryAsyncResult.cs
- MessageContractExporter.cs
- CommunicationObjectAbortedException.cs
- ObjectListItem.cs
- Tablet.cs
- WeakReferenceEnumerator.cs
- DocumentReferenceCollection.cs
- FacetDescription.cs
- HTMLTextWriter.cs
- SystemEvents.cs
- X509Chain.cs
- UInt16.cs
- MaterialCollection.cs
- HttpListenerContext.cs
- MiniParameterInfo.cs
- WebPartDisplayModeCollection.cs
- DataMember.cs
- TransactionScopeDesigner.cs
- PrintEvent.cs
- MobileResource.cs
- ResourceSet.cs
- HtmlElementCollection.cs
- CopyAttributesAction.cs
- WrapPanel.cs
- MenuItem.cs
- Environment.cs
- TransactionsSectionGroup.cs
- SessionEndingEventArgs.cs
- ParserStreamGeometryContext.cs
- SegmentInfo.cs
- Double.cs
- TableItemPatternIdentifiers.cs
- BaseTemplateBuildProvider.cs
- ExtenderProvidedPropertyAttribute.cs
- BindingContext.cs
- HostProtectionException.cs
- MenuItemBinding.cs
- BrowserCapabilitiesCompiler.cs
- ContentPlaceHolderDesigner.cs
- mediaclock.cs
- ACL.cs
- FontWeights.cs
- SurrogateEncoder.cs
- TextSerializer.cs
- DetailsViewActionList.cs
- MarkupCompilePass2.cs
- controlskin.cs
- RedistVersionInfo.cs
- DbConnectionPoolCounters.cs
- LiteralText.cs
- OleDbEnumerator.cs
- OdbcInfoMessageEvent.cs
- ResourceReferenceExpression.cs
- LineGeometry.cs
- MethodResolver.cs
- LoadWorkflowCommand.cs
- ComponentResourceManager.cs
- CanExecuteRoutedEventArgs.cs
- Simplifier.cs
- TableLayoutSettings.cs
- SoapAttributeOverrides.cs
- Application.cs
- TextView.cs
- XmlSchemaCompilationSettings.cs
- TargetControlTypeCache.cs
- SystemParameters.cs
- GenericNameHandler.cs
- ContentType.cs