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
- AdapterDictionary.cs
- DateTimePicker.cs
- MissingMemberException.cs
- SHA512.cs
- SubclassTypeValidator.cs
- ResourceAssociationTypeEnd.cs
- ForeignConstraint.cs
- AudioSignalProblemOccurredEventArgs.cs
- ProviderCommandInfoUtils.cs
- Pair.cs
- Columns.cs
- BaseProcessor.cs
- CopyNamespacesAction.cs
- RichTextBoxAutomationPeer.cs
- Geometry.cs
- MsmqTransportElement.cs
- AsyncWaitHandle.cs
- Viewport3DVisual.cs
- FontCacheLogic.cs
- DnsPermission.cs
- PageCodeDomTreeGenerator.cs
- FormViewDeleteEventArgs.cs
- AudioDeviceOut.cs
- ReferenceCountedObject.cs
- HostedBindingBehavior.cs
- RuleSetBrowserDialog.cs
- MediaSystem.cs
- GeneralTransform3DGroup.cs
- SymbolDocumentGenerator.cs
- SQLInt16.cs
- FileInfo.cs
- OdbcPermission.cs
- UpWmlPageAdapter.cs
- EncodingNLS.cs
- WeakKeyDictionary.cs
- SafeWaitHandle.cs
- TypeForwardedToAttribute.cs
- UInt64Storage.cs
- WebPartZone.cs
- BitmapEffectInputData.cs
- ConnectionStringSettings.cs
- LogicalChannelCollection.cs
- StringUtil.cs
- DynamicActivityXamlReader.cs
- RuntimeConfig.cs
- ImageConverter.cs
- SiteMapPath.cs
- DispatcherProcessingDisabled.cs
- AutomationPropertyInfo.cs
- EntityDataSourceQueryBuilder.cs
- EncodingTable.cs
- LineServicesCallbacks.cs
- ViewStateException.cs
- DoubleLinkList.cs
- UnicodeEncoding.cs
- BindingExpressionBase.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- RawStylusSystemGestureInputReport.cs
- CommonBehaviorsSection.cs
- RealizationContext.cs
- HtmlValidationSummaryAdapter.cs
- ConfigurationException.cs
- FtpRequestCacheValidator.cs
- HMACSHA512.cs
- CqlParserHelpers.cs
- TrackingMemoryStreamFactory.cs
- MethodBody.cs
- TypeReference.cs
- ProcessHostConfigUtils.cs
- TreeViewImageKeyConverter.cs
- updateconfighost.cs
- XmlUrlResolver.cs
- MustUnderstandBehavior.cs
- HtmlInputImage.cs
- ModelItemDictionary.cs
- SQLBytesStorage.cs
- GridViewUpdatedEventArgs.cs
- SqlDataSourceCustomCommandPanel.cs
- ListViewItemCollectionEditor.cs
- PropertyChangeTracker.cs
- SQLCharsStorage.cs
- CanExecuteRoutedEventArgs.cs
- ScalarOps.cs
- RegexMatchCollection.cs
- UpdatePanelTriggerCollection.cs
- CodeIndexerExpression.cs
- TreeNodeCollection.cs
- SafeRightsManagementEnvironmentHandle.cs
- CatalogPartCollection.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs
- SmtpNtlmAuthenticationModule.cs
- XomlCompilerResults.cs
- SignedPkcs7.cs
- HttpDebugHandler.cs
- DataGridViewRowHeaderCell.cs
- EntityStoreSchemaFilterEntry.cs
- TemplatedEditableDesignerRegion.cs
- ImageKeyConverter.cs
- BooleanStorage.cs
- ExtentCqlBlock.cs