Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartEditVerb.cs / 1305376 / WebPartEditVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartEditVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartEditVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartEditVerb_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.WebPartEditVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartEditVerb_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 WebPartEditVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartEditVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartEditVerb_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.WebPartEditVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartEditVerb_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
- ServiceElementCollection.cs
- Int32Storage.cs
- StorageAssociationTypeMapping.cs
- XmlBoundElement.cs
- FontNamesConverter.cs
- ProxyWebPartManager.cs
- MILUtilities.cs
- QuotedPrintableStream.cs
- EasingKeyFrames.cs
- SafeProcessHandle.cs
- ProcessHostConfigUtils.cs
- updatecommandorderer.cs
- CookielessHelper.cs
- FixedSOMGroup.cs
- Command.cs
- ScrollViewer.cs
- DecoderFallback.cs
- Events.cs
- CacheEntry.cs
- InputLanguageEventArgs.cs
- BuildManagerHost.cs
- Annotation.cs
- GenericNameHandler.cs
- FatalException.cs
- CheckBoxFlatAdapter.cs
- HttpApplicationStateBase.cs
- AssemblyCollection.cs
- StringComparer.cs
- PopupRoot.cs
- BasicExpressionVisitor.cs
- Line.cs
- CustomSignedXml.cs
- ColorMatrix.cs
- TextShapeableCharacters.cs
- StringFreezingAttribute.cs
- OracleDataAdapter.cs
- EpmHelper.cs
- XmlChoiceIdentifierAttribute.cs
- Config.cs
- Vector3DCollection.cs
- PlaceHolder.cs
- DelegatingMessage.cs
- TemplateInstanceAttribute.cs
- WebPartsSection.cs
- XsltQilFactory.cs
- GridProviderWrapper.cs
- UnionExpr.cs
- XmlSerializableServices.cs
- Type.cs
- Geometry3D.cs
- ZoomPercentageConverter.cs
- ProfileSettings.cs
- DbDataRecord.cs
- UIElementCollection.cs
- processwaithandle.cs
- ExpandedProjectionNode.cs
- TranslateTransform3D.cs
- MobileTextWriter.cs
- InkCanvasSelection.cs
- TextTreeTextBlock.cs
- KeySpline.cs
- PropertyGridEditorPart.cs
- BlockUIContainer.cs
- VisualBrush.cs
- DataDocumentXPathNavigator.cs
- UpdateTranslator.cs
- Geometry3D.cs
- SecureEnvironment.cs
- ToolStripPanel.cs
- AutomationAttributeInfo.cs
- StateChangeEvent.cs
- SelectionPattern.cs
- RowBinding.cs
- Function.cs
- ExecutedRoutedEventArgs.cs
- IxmlLineInfo.cs
- ServiceDescriptionSerializer.cs
- DoubleStorage.cs
- ConnectionStringsExpressionBuilder.cs
- SessionPageStateSection.cs
- TdsRecordBufferSetter.cs
- WebBrowserProgressChangedEventHandler.cs
- WebPartEditVerb.cs
- PropertyMappingExceptionEventArgs.cs
- ClientUrlResolverWrapper.cs
- Directory.cs
- ResourceReader.cs
- HtmlWindowCollection.cs
- PenContext.cs
- Span.cs
- DiagnosticTraceSource.cs
- WebPartsSection.cs
- TimerElapsedEvenArgs.cs
- SHA384Managed.cs
- SafeCryptoKeyHandle.cs
- XmlNodeChangedEventManager.cs
- FontUnit.cs
- ClientRoleProvider.cs
- ToolStripGrip.cs
- XLinq.cs