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
- HMACSHA256.cs
- FontStretches.cs
- ProxyHelper.cs
- _Connection.cs
- RewritingProcessor.cs
- Inline.cs
- SectionVisual.cs
- TdsRecordBufferSetter.cs
- MatchAttribute.cs
- WorkflowServiceHostFactory.cs
- WmfPlaceableFileHeader.cs
- FixedSOMFixedBlock.cs
- SessionStateContainer.cs
- WeakReferenceList.cs
- InternalMappingException.cs
- DataBoundLiteralControl.cs
- ComboBoxItem.cs
- ImmutableDispatchRuntime.cs
- ColorAnimationUsingKeyFrames.cs
- PriorityChain.cs
- QueryUtil.cs
- WinFormsComponentEditor.cs
- StyleCollection.cs
- HyperLinkField.cs
- StyleBamlTreeBuilder.cs
- prefixendpointaddressmessagefiltertable.cs
- XmlSchemaSimpleContent.cs
- MenuItemStyle.cs
- DBCommandBuilder.cs
- AppDomain.cs
- HelpFileFileNameEditor.cs
- SoapSchemaExporter.cs
- comcontractssection.cs
- MemberPath.cs
- HtmlControl.cs
- StylusDownEventArgs.cs
- TextTreePropertyUndoUnit.cs
- PropertyStore.cs
- BrowserCapabilitiesCodeGenerator.cs
- TreeNodeBindingCollection.cs
- TransformerTypeCollection.cs
- DesignerActionGlyph.cs
- BackgroundWorker.cs
- BuildProvider.cs
- RemoteDebugger.cs
- FormsAuthenticationEventArgs.cs
- DataControlFieldCollection.cs
- CompositeTypefaceMetrics.cs
- SchemaNames.cs
- SR.cs
- OdbcDataReader.cs
- SchemaNotation.cs
- FormClosingEvent.cs
- GraphicsContainer.cs
- PrintDialogException.cs
- MimeMultiPart.cs
- DataSourceViewSchemaConverter.cs
- DataSpaceManager.cs
- TraceRecord.cs
- Margins.cs
- MeshGeometry3D.cs
- SoapSchemaExporter.cs
- SoapEnumAttribute.cs
- TextSpanModifier.cs
- ConstraintStruct.cs
- ZipIOExtraFieldPaddingElement.cs
- ResolvedKeyFrameEntry.cs
- AssemblyNameProxy.cs
- UIHelper.cs
- StreamReader.cs
- DbSourceParameterCollection.cs
- StringInfo.cs
- InitializeCorrelation.cs
- WebMethodAttribute.cs
- AttributeUsageAttribute.cs
- XmlMembersMapping.cs
- PermissionAttributes.cs
- SchemaHelper.cs
- Parameter.cs
- BaseTemplateBuildProvider.cs
- SR.cs
- LinkAreaEditor.cs
- KnownTypesProvider.cs
- DataGridRow.cs
- CharEntityEncoderFallback.cs
- ProcessHostMapPath.cs
- ClrProviderManifest.cs
- ComponentRenameEvent.cs
- ToolStripDropDownButton.cs
- ProgressChangedEventArgs.cs
- GridView.cs
- Timeline.cs
- SecurityElement.cs
- SymLanguageType.cs
- ObjectSpanRewriter.cs
- StyleSheetDesigner.cs
- EntityConnectionStringBuilderItem.cs
- InvokeMethod.cs
- FaultDescriptionCollection.cs
- OdbcErrorCollection.cs