Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartCloseVerb.cs / 1305376 / WebPartCloseVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartCloseVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartCloseVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartCloseVerb_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.WebPartCloseVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartCloseVerb_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 WebPartCloseVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartCloseVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartCloseVerb_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.WebPartCloseVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartCloseVerb_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
- HttpRawResponse.cs
- PersonalizableAttribute.cs
- BamlWriter.cs
- SetIterators.cs
- BamlLocalizabilityResolver.cs
- InvalidComObjectException.cs
- SpoolingTaskBase.cs
- MD5CryptoServiceProvider.cs
- CacheVirtualItemsEvent.cs
- HelpInfo.cs
- DataServiceRequestOfT.cs
- Stopwatch.cs
- KernelTypeValidation.cs
- KeyboardNavigation.cs
- ClientData.cs
- Point3DIndependentAnimationStorage.cs
- CompileLiteralTextParser.cs
- PerformanceCounterPermissionEntry.cs
- FunctionDescription.cs
- ToolStripMenuItem.cs
- ObservableDictionary.cs
- NamedPermissionSet.cs
- CreateRefExpr.cs
- FixedSOMTable.cs
- DateTimeFormatInfo.cs
- Figure.cs
- AbsoluteQuery.cs
- WindowsScrollBarBits.cs
- DataGridViewHeaderCell.cs
- ClientFormsAuthenticationCredentials.cs
- RootBrowserWindow.cs
- ColorPalette.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- HttpGetServerProtocol.cs
- SourceFileBuildProvider.cs
- ChtmlTextWriter.cs
- Automation.cs
- RowBinding.cs
- StructuredTypeInfo.cs
- PathNode.cs
- DocumentSequenceHighlightLayer.cs
- ResourceAttributes.cs
- EmptyWithCancelationCheckWorkItem.cs
- PinnedBufferMemoryStream.cs
- RectKeyFrameCollection.cs
- QueueProcessor.cs
- PersonalizationAdministration.cs
- WebPartCancelEventArgs.cs
- FontFaceLayoutInfo.cs
- CharKeyFrameCollection.cs
- TextElement.cs
- HtmlCalendarAdapter.cs
- System.Data_BID.cs
- DataSourceProvider.cs
- PermissionRequestEvidence.cs
- CallbackWrapper.cs
- PrimaryKeyTypeConverter.cs
- Substitution.cs
- SchemaNotation.cs
- DataGridViewIntLinkedList.cs
- ToolboxService.cs
- ThreadAttributes.cs
- streamingZipPartStream.cs
- SmiTypedGetterSetter.cs
- SupportsEventValidationAttribute.cs
- ObjectQueryProvider.cs
- IODescriptionAttribute.cs
- PointUtil.cs
- CommentEmitter.cs
- Graphics.cs
- RowCache.cs
- EntityContainer.cs
- TableLayoutPanelBehavior.cs
- InstanceOwnerQueryResult.cs
- XamlBrushSerializer.cs
- GroupBoxDesigner.cs
- MergeFilterQuery.cs
- GridViewActionList.cs
- Pointer.cs
- PenLineJoinValidation.cs
- AppearanceEditorPart.cs
- LoginUtil.cs
- ProviderUtil.cs
- PipeStream.cs
- CompiledQuery.cs
- DependencyObject.cs
- ForEachAction.cs
- Main.cs
- BitmapMetadataEnumerator.cs
- StylusSystemGestureEventArgs.cs
- FontFamilyConverter.cs
- Deserializer.cs
- DataGridViewColumnHeaderCell.cs
- ArgumentDirectionHelper.cs
- ComponentChangingEvent.cs
- CachedCompositeFamily.cs
- CrossContextChannel.cs
- EngineSiteSapi.cs
- ServiceParser.cs
- MarkupCompilePass2.cs