Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartHelpVerb.cs / 1 / WebPartHelpVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartHelpVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartHelpVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartHelpVerb_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.WebPartHelpVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartHelpVerb_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 WebPartHelpVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartHelpVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartHelpVerb_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.WebPartHelpVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartHelpVerb_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
- Convert.cs
- StateItem.cs
- TextContainerHelper.cs
- TableLayoutSettings.cs
- TrackingProfile.cs
- StringReader.cs
- BamlLocalizableResourceKey.cs
- ImageClickEventArgs.cs
- RemoteAsymmetricSignatureFormatter.cs
- DataBindingCollection.cs
- UpDownEvent.cs
- ReadWriteSpinLock.cs
- Int16KeyFrameCollection.cs
- ImportDesigner.xaml.cs
- WebService.cs
- DBCommandBuilder.cs
- ColumnHeader.cs
- DbReferenceCollection.cs
- OrthographicCamera.cs
- ChildTable.cs
- WebPartConnectionsConnectVerb.cs
- TracingConnectionInitiator.cs
- NavigationFailedEventArgs.cs
- PartitionedDataSource.cs
- StandardOleMarshalObject.cs
- oledbmetadatacollectionnames.cs
- ArrayHelper.cs
- SqlTopReducer.cs
- Utility.cs
- LocalizationParserHooks.cs
- DrawingAttributes.cs
- RemotingConfigParser.cs
- ZoneLinkButton.cs
- LinqDataSourceSelectEventArgs.cs
- BackStopAuthenticationModule.cs
- ItemsChangedEventArgs.cs
- NativeMethodsOther.cs
- GregorianCalendarHelper.cs
- WebPartEditVerb.cs
- VirtualizingStackPanel.cs
- StreamWriter.cs
- FormParameter.cs
- Parser.cs
- _NestedMultipleAsyncResult.cs
- OutputCacheProfileCollection.cs
- InputBindingCollection.cs
- RelativeSource.cs
- PostBackOptions.cs
- OleDbStruct.cs
- SetterBase.cs
- ProfileSection.cs
- XmlElement.cs
- XmlSchemaObjectCollection.cs
- ClientScriptItem.cs
- XmlSchemaSet.cs
- ReadOnlyDictionary.cs
- DynamicPropertyReader.cs
- DeviceContexts.cs
- SplashScreen.cs
- SqlDataSourceConnectionPanel.cs
- Interfaces.cs
- RotateTransform.cs
- DataSetSchema.cs
- FixedDocumentPaginator.cs
- Camera.cs
- ImageConverter.cs
- CheckBoxPopupAdapter.cs
- ObjectContextServiceProvider.cs
- Pair.cs
- arclist.cs
- LinqDataView.cs
- PolyBezierSegment.cs
- SQLBytes.cs
- SiteMapNodeCollection.cs
- HostUtils.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- SafeEventLogWriteHandle.cs
- AdapterUtil.cs
- CodeCastExpression.cs
- ArcSegment.cs
- FileUtil.cs
- XmlSerializerAssemblyAttribute.cs
- VersionConverter.cs
- ManagedWndProcTracker.cs
- LiteralDesigner.cs
- altserialization.cs
- RelationshipDetailsRow.cs
- WindowsIPAddress.cs
- DispatcherHookEventArgs.cs
- SocketException.cs
- RotateTransform3D.cs
- ErrorRuntimeConfig.cs
- PersistenceMetadataNamespace.cs
- RandomDelayQueuedSendsAsyncResult.cs
- WriterOutput.cs
- PeerTransportCredentialType.cs
- InstanceValue.cs
- DataServiceRequestOfT.cs
- QueueAccessMode.cs
- SatelliteContractVersionAttribute.cs