Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DbConnectionInternal.cs
- Image.cs
- PartitionResolver.cs
- ProcessThread.cs
- AndCondition.cs
- PolyBezierSegment.cs
- Int32KeyFrameCollection.cs
- RegexTree.cs
- TemplateBuilder.cs
- CreateUserWizard.cs
- MenuDesigner.cs
- StrongNameUtility.cs
- DesignerTransactionCloseEvent.cs
- SqlServer2KCompatibilityCheck.cs
- IInstanceTable.cs
- AssemblyInfo.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- WmfPlaceableFileHeader.cs
- BridgeDataReader.cs
- ChannelManager.cs
- cookieexception.cs
- XmlAnyElementAttributes.cs
- TextParaLineResult.cs
- TableLayoutPanelDesigner.cs
- SafeRightsManagementSessionHandle.cs
- Root.cs
- XmlKeywords.cs
- AmbientProperties.cs
- Variable.cs
- HtmlUtf8RawTextWriter.cs
- TextDecoration.cs
- DataGridViewColumnConverter.cs
- XPathChildIterator.cs
- WebPartConnectVerb.cs
- ReadingWritingEntityEventArgs.cs
- AssertSection.cs
- Script.cs
- ListenerElementsCollection.cs
- SqlCommandSet.cs
- TypefaceMetricsCache.cs
- BypassElement.cs
- VirtualPathProvider.cs
- SoapDocumentServiceAttribute.cs
- MarkupCompilePass1.cs
- ObjectDisposedException.cs
- UpdateCommand.cs
- ParseChildrenAsPropertiesAttribute.cs
- ZipIOFileItemStream.cs
- UserControl.cs
- SHA512Managed.cs
- SystemSounds.cs
- ReferencedType.cs
- HwndMouseInputProvider.cs
- RectKeyFrameCollection.cs
- DataGridParentRows.cs
- GenericWebPart.cs
- UnsafeNativeMethods.cs
- DictionaryCustomTypeDescriptor.cs
- PrinterResolution.cs
- CodeStatement.cs
- GeneratedCodeAttribute.cs
- MissingFieldException.cs
- BitmapVisualManager.cs
- CompatibleComparer.cs
- Empty.cs
- DataListItemCollection.cs
- ChannelListenerBase.cs
- TypeConverter.cs
- TemplatedControlDesigner.cs
- StylusPlugInCollection.cs
- ExpressionBuilderContext.cs
- XmlSchemaExporter.cs
- Vector3DConverter.cs
- AppDomainManager.cs
- DataTableExtensions.cs
- PropertiesTab.cs
- Pair.cs
- DBPropSet.cs
- AmbientValueAttribute.cs
- SystemParameters.cs
- TreeNodeSelectionProcessor.cs
- Rules.cs
- WebBrowserPermission.cs
- Literal.cs
- DateTimeSerializationSection.cs
- SamlSubject.cs
- HtmlShimManager.cs
- SystemIcmpV4Statistics.cs
- AllMembershipCondition.cs
- ObjectItemCachedAssemblyLoader.cs
- HandlerBase.cs
- HandlerBase.cs
- CaseStatement.cs
- ToolStripStatusLabel.cs
- Brush.cs
- NetNamedPipeSecurity.cs
- MergeExecutor.cs
- DoubleLink.cs
- MailAddress.cs
- MessageSecurityVersion.cs