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
- BezierSegment.cs
- XPathException.cs
- FileUpload.cs
- HostedTcpTransportManager.cs
- SocketAddress.cs
- SecureEnvironment.cs
- HtmlButton.cs
- IsolatedStorageFilePermission.cs
- CookielessData.cs
- SelectionHighlightInfo.cs
- ConfigDefinitionUpdates.cs
- ObjectItemLoadingSessionData.cs
- PrintingPermission.cs
- UnionExpr.cs
- FontSourceCollection.cs
- ConfigXmlElement.cs
- XmlSchemaSimpleType.cs
- GroupBoxRenderer.cs
- odbcmetadatafactory.cs
- IsolatedStorageException.cs
- WebColorConverter.cs
- XmlSerializerAssemblyAttribute.cs
- DataGridAddNewRow.cs
- HwndSource.cs
- GcHandle.cs
- TraceHwndHost.cs
- UIElement3D.cs
- StringConcat.cs
- SqlXmlStorage.cs
- ThemeDirectoryCompiler.cs
- Selection.cs
- TabletDeviceInfo.cs
- LineGeometry.cs
- BaseTreeIterator.cs
- ServerTooBusyException.cs
- KeyedQueue.cs
- XmlSchemaAttribute.cs
- CompilerScopeManager.cs
- DataMemberConverter.cs
- SafeCryptContextHandle.cs
- LabelLiteral.cs
- SqlUserDefinedTypeAttribute.cs
- LifetimeServices.cs
- XmlSchemaFacet.cs
- GeometryHitTestParameters.cs
- MaskInputRejectedEventArgs.cs
- X509ThumbprintKeyIdentifierClause.cs
- Task.cs
- EtwTrace.cs
- DoubleAnimationUsingPath.cs
- QilSortKey.cs
- DataGridViewSelectedRowCollection.cs
- AmbientLight.cs
- base64Transforms.cs
- RawStylusInputReport.cs
- QilPatternFactory.cs
- LineSegment.cs
- FixedSOMLineRanges.cs
- TransformerInfoCollection.cs
- SelectionGlyph.cs
- GACMembershipCondition.cs
- XmlWriterSettings.cs
- KnownBoxes.cs
- RealizationContext.cs
- PenThreadPool.cs
- ToolStripSystemRenderer.cs
- ProgressBar.cs
- FontUnit.cs
- ChtmlLinkAdapter.cs
- ArrayTypeMismatchException.cs
- PocoEntityKeyStrategy.cs
- Component.cs
- IdleTimeoutMonitor.cs
- CodeMethodInvokeExpression.cs
- StyleSelector.cs
- InputScope.cs
- PhysicalFontFamily.cs
- SystemFonts.cs
- GridViewRowCollection.cs
- AsyncStreamReader.cs
- Scheduling.cs
- InvalidEnumArgumentException.cs
- VectorConverter.cs
- EvidenceBase.cs
- DeflateEmulationStream.cs
- HyperLinkStyle.cs
- BitmapMetadata.cs
- XDeferredAxisSource.cs
- SchemaType.cs
- SQLBoolean.cs
- MouseButton.cs
- Buffer.cs
- EditableTreeList.cs
- TextElementEnumerator.cs
- Int16.cs
- CachedFontFamily.cs
- ValidationError.cs
- WSSecureConversationFeb2005.cs
- ConfigXmlAttribute.cs
- EventItfInfo.cs