Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartRestoreVerb.cs / 1 / WebPartRestoreVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartRestoreVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartRestoreVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartRestoreVerb_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.WebPartRestoreVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartRestoreVerb_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 WebPartRestoreVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartRestoreVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartRestoreVerb_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.WebPartRestoreVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartRestoreVerb_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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CSharpCodeProvider.cs
- RequestCachePolicy.cs
- RequestCachePolicy.cs
- SqlCacheDependencySection.cs
- SingleBodyParameterMessageFormatter.cs
- ArgumentDirectionHelper.cs
- TableItemStyle.cs
- UnknownBitmapDecoder.cs
- EdmToObjectNamespaceMap.cs
- TerminatorSinks.cs
- ISAPIApplicationHost.cs
- DispatcherExceptionFilterEventArgs.cs
- PrintDialogException.cs
- BrowserDefinition.cs
- GeneratedContractType.cs
- HtmlMeta.cs
- ManipulationLogic.cs
- ComboBoxItem.cs
- ThicknessAnimationUsingKeyFrames.cs
- VisualBasicExpressionConverter.cs
- Interlocked.cs
- BinaryCommonClasses.cs
- BindingNavigatorDesigner.cs
- TargetException.cs
- CompositeControl.cs
- AppDomainProtocolHandler.cs
- DeadLetterQueue.cs
- WebHttpBinding.cs
- BitmapEffect.cs
- WFItemsToSpacerVisibility.cs
- ColumnResult.cs
- AutoFocusStyle.xaml.cs
- ObjectComplexPropertyMapping.cs
- DataReceivedEventArgs.cs
- TreeNodeCollection.cs
- _ShellExpression.cs
- TextSelectionHighlightLayer.cs
- DialogBaseForm.cs
- WindowsGraphicsWrapper.cs
- JsonStringDataContract.cs
- OutputWindow.cs
- AttributeCollection.cs
- TableRowCollection.cs
- WeakReadOnlyCollection.cs
- FlagsAttribute.cs
- GridViewDeletedEventArgs.cs
- InputElement.cs
- XmlSchemaSimpleContent.cs
- ResourceSet.cs
- CodeCatchClauseCollection.cs
- LifetimeManager.cs
- SetMemberBinder.cs
- DrawingBrush.cs
- NativeMethods.cs
- ArgumentsParser.cs
- SelfIssuedAuthProofToken.cs
- KeyboardEventArgs.cs
- PaperSize.cs
- HttpCachePolicyElement.cs
- HttpWebRequest.cs
- PtsContext.cs
- ToolboxBitmapAttribute.cs
- DataMisalignedException.cs
- HttpListenerException.cs
- FormsIdentity.cs
- RbTree.cs
- XmlDataDocument.cs
- ToolboxComponentsCreatedEventArgs.cs
- ProcessHostFactoryHelper.cs
- PolyQuadraticBezierSegment.cs
- Select.cs
- BindingWorker.cs
- LingerOption.cs
- BaseDataList.cs
- MethodAccessException.cs
- SocketInformation.cs
- DataTrigger.cs
- TypedElement.cs
- KerberosSecurityTokenAuthenticator.cs
- BaseTransportHeaders.cs
- OdbcDataAdapter.cs
- SafeMarshalContext.cs
- TypeGeneratedEventArgs.cs
- CompareValidator.cs
- WebHttpEndpointElement.cs
- XmlCompatibilityReader.cs
- EntityTransaction.cs
- TrackingLocationCollection.cs
- SQLGuidStorage.cs
- SqlProfileProvider.cs
- PerformanceCounterCategory.cs
- X509Utils.cs
- EmptyEnumerator.cs
- LogWriteRestartAreaState.cs
- SortQuery.cs
- SystemIPv6InterfaceProperties.cs
- CompressionTransform.cs
- Configuration.cs
- TextEditor.cs
- SimpleHandlerBuildProvider.cs