Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartCloseVerb.cs / 1 / WebPartCloseVerb.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
internal sealed class WebPartCloseVerb : WebPartActionVerb {
private string _defaultDescription;
private string _defaultText;
private string DefaultDescription {
get {
if (_defaultDescription == null) {
_defaultDescription = SR.GetString(SR.WebPartCloseVerb_Description);
}
return _defaultDescription;
}
}
private string DefaultText {
get {
if (_defaultText == null) {
_defaultText = SR.GetString(SR.WebPartCloseVerb_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.WebPartCloseVerb_Description)
]
public override string Description {
get {
object o = ViewState["Description"];
return (o == null) ? DefaultDescription : (string)o;
}
set {
ViewState["Description"] = value;
}
}
[
WebSysDefaultValue(SR.WebPartCloseVerb_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.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
internal sealed class WebPartCloseVerb : WebPartActionVerb {
private string _defaultDescription;
private string _defaultText;
private string DefaultDescription {
get {
if (_defaultDescription == null) {
_defaultDescription = SR.GetString(SR.WebPartCloseVerb_Description);
}
return _defaultDescription;
}
}
private string DefaultText {
get {
if (_defaultText == null) {
_defaultText = SR.GetString(SR.WebPartCloseVerb_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.WebPartCloseVerb_Description)
]
public override string Description {
get {
object o = ViewState["Description"];
return (o == null) ? DefaultDescription : (string)o;
}
set {
ViewState["Description"] = value;
}
}
[
WebSysDefaultValue(SR.WebPartCloseVerb_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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Authorization.cs
- NetPeerTcpBinding.cs
- RootProfilePropertySettingsCollection.cs
- BitmapCodecInfo.cs
- IUnknownConstantAttribute.cs
- CodeAttachEventStatement.cs
- PasswordDeriveBytes.cs
- TypefaceMap.cs
- FixedBufferAttribute.cs
- precedingsibling.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- DateTimeAutomationPeer.cs
- SchemaTypeEmitter.cs
- SurrogateEncoder.cs
- TreeNodeMouseHoverEvent.cs
- ChannelTraceRecord.cs
- MLangCodePageEncoding.cs
- HostingEnvironmentSection.cs
- TextBounds.cs
- SharedMemory.cs
- EventLevel.cs
- SqlCrossApplyToCrossJoin.cs
- ArrayWithOffset.cs
- PlainXmlWriter.cs
- DependsOnAttribute.cs
- LogLogRecordEnumerator.cs
- Function.cs
- DataGridViewCellCancelEventArgs.cs
- ISAPIRuntime.cs
- BamlCollectionHolder.cs
- SqlDataSourceEnumerator.cs
- OleDbParameter.cs
- RegisteredDisposeScript.cs
- SafeCoTaskMem.cs
- SafeNativeMethods.cs
- CalendarTable.cs
- StateMachineSubscription.cs
- TreeNodeSelectionProcessor.cs
- RsaKeyIdentifierClause.cs
- OLEDB_Enum.cs
- ConstructorNeedsTagAttribute.cs
- ReplacementText.cs
- basemetadatamappingvisitor.cs
- ExpressionEditorAttribute.cs
- ISAPIWorkerRequest.cs
- RowToParametersTransformer.cs
- StringConverter.cs
- MenuItem.cs
- PocoEntityKeyStrategy.cs
- OdbcException.cs
- PropertyEmitter.cs
- RSAOAEPKeyExchangeFormatter.cs
- FontDifferentiator.cs
- DataGridViewElement.cs
- DataTemplateSelector.cs
- httpserverutility.cs
- EnumType.cs
- IdleTimeoutMonitor.cs
- ResourcesChangeInfo.cs
- ApplicationCommands.cs
- Point3DCollectionValueSerializer.cs
- PropertyChangedEventManager.cs
- SQLDoubleStorage.cs
- EmbeddedMailObjectsCollection.cs
- BezierSegment.cs
- LinqDataSourceSelectEventArgs.cs
- SafeEventLogWriteHandle.cs
- TimeSpanSecondsConverter.cs
- HyperlinkAutomationPeer.cs
- KnownBoxes.cs
- SelectionRangeConverter.cs
- String.cs
- HtmlControlAdapter.cs
- ResolveNameEventArgs.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ObfuscationAttribute.cs
- XmlIgnoreAttribute.cs
- DataSourceXmlTextReader.cs
- PropertyFilter.cs
- _PooledStream.cs
- PropertyKey.cs
- DataService.cs
- QilSortKey.cs
- LogicalExpr.cs
- ChannelCacheSettings.cs
- ListViewDataItem.cs
- TableRow.cs
- SelectorItemAutomationPeer.cs
- BaseParser.cs
- ListChangedEventArgs.cs
- Thickness.cs
- MorphHelper.cs
- QueryInterceptorAttribute.cs
- ConnectionProviderAttribute.cs
- XpsDocumentEvent.cs
- MouseButtonEventArgs.cs
- TreeNodeCollectionEditor.cs
- SafeHandle.cs
- TraceFilter.cs
- BindingContext.cs