Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartDeleteVerb.cs / 1305376 / WebPartDeleteVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartDeleteVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartDeleteVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartDeleteVerb_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.WebPartDeleteVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartDeleteVerb_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 WebPartDeleteVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartDeleteVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartDeleteVerb_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.WebPartDeleteVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartDeleteVerb_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
- InternalBufferOverflowException.cs
- WebPartMinimizeVerb.cs
- StreamingContext.cs
- SqlCommandBuilder.cs
- MissingMemberException.cs
- FilterEventArgs.cs
- mediapermission.cs
- CodeStatement.cs
- SplineKeyFrames.cs
- CreateUserErrorEventArgs.cs
- ComNativeDescriptor.cs
- RelationshipEndCollection.cs
- DataGridViewUtilities.cs
- WorkflowInspectionServices.cs
- AspNetHostingPermission.cs
- CompilationSection.cs
- SerializationFieldInfo.cs
- InertiaExpansionBehavior.cs
- DataGridCellItemAutomationPeer.cs
- Int32RectValueSerializer.cs
- ListItemsPage.cs
- LinkArea.cs
- DocumentEventArgs.cs
- CompilationSection.cs
- ReadOnlyHierarchicalDataSource.cs
- Scheduler.cs
- RuntimeCompatibilityAttribute.cs
- CounterSampleCalculator.cs
- WebPartExportVerb.cs
- InternalPolicyElement.cs
- ListCommandEventArgs.cs
- RemoteWebConfigurationHostServer.cs
- QilIterator.cs
- FacetValues.cs
- OpCellTreeNode.cs
- TextStore.cs
- Section.cs
- _OSSOCK.cs
- MultipartIdentifier.cs
- UInt32Storage.cs
- PriorityQueue.cs
- Attachment.cs
- TimeoutTimer.cs
- SqlCacheDependencySection.cs
- TargetControlTypeAttribute.cs
- SerializationSectionGroup.cs
- ParameterCollection.cs
- SafeMemoryMappedViewHandle.cs
- CodeTypeReferenceExpression.cs
- ConfigUtil.cs
- AuthenticationModulesSection.cs
- ToolStripLabel.cs
- MemoryPressure.cs
- _NegoState.cs
- AliasedSlot.cs
- DynamicPropertyHolder.cs
- MenuAdapter.cs
- RSAProtectedConfigurationProvider.cs
- BindingSource.cs
- BuildProviderCollection.cs
- BrushMappingModeValidation.cs
- NavigationWindow.cs
- assertwrapper.cs
- XmlAttributeCollection.cs
- StylusPointPropertyInfo.cs
- CachedPathData.cs
- ListViewCommandEventArgs.cs
- ServiceContractAttribute.cs
- ReflectTypeDescriptionProvider.cs
- InputLanguageEventArgs.cs
- DataControlButton.cs
- CuspData.cs
- CodeAttributeArgument.cs
- Localizer.cs
- StrongNameSignatureInformation.cs
- HtmlTable.cs
- WebPartConnectVerb.cs
- WebExceptionStatus.cs
- Wildcard.cs
- XmlReturnWriter.cs
- DbgCompiler.cs
- XmlSchemaExporter.cs
- OracleRowUpdatedEventArgs.cs
- ToolStripRenderer.cs
- BaseValidator.cs
- Number.cs
- EraserBehavior.cs
- ApplicationDirectoryMembershipCondition.cs
- HatchBrush.cs
- NeutralResourcesLanguageAttribute.cs
- DataGridViewLayoutData.cs
- SqlDataSourceConfigureSortForm.cs
- PresentationTraceSources.cs
- DataGridViewRowConverter.cs
- ViewGenResults.cs
- FontInfo.cs
- ContentElementAutomationPeer.cs
- WhitespaceRuleReader.cs
- SoapClientMessage.cs
- PathSegmentCollection.cs