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 / ZoneButton.cs / 1 / ZoneButton.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
using System.ComponentModel;
using System.Web.UI.WebControls;
[SupportsEventValidation]
internal sealed class ZoneButton : Button {
private WebZone _owner;
private string _eventArgument;
public ZoneButton(WebZone owner, string eventArgument) {
if (owner == null) {
throw new ArgumentNullException("owner");
}
_owner = owner;
_eventArgument = eventArgument;
}
[
DefaultValue(false),
]
public override bool UseSubmitBehavior {
get {
return false;
}
set {
// This is an internal sealed class so we know the setter is never called.
throw new InvalidOperationException();
}
}
protected override PostBackOptions GetPostBackOptions() {
// _owner.Page may be null in the designer
if (!String.IsNullOrEmpty(_eventArgument) && _owner.Page != null) {
PostBackOptions options = new PostBackOptions(_owner, _eventArgument);
options.ClientSubmit = true;
return options;
}
return base.GetPostBackOptions();
}
}
}
// 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;
using System.ComponentModel;
using System.Web.UI.WebControls;
[SupportsEventValidation]
internal sealed class ZoneButton : Button {
private WebZone _owner;
private string _eventArgument;
public ZoneButton(WebZone owner, string eventArgument) {
if (owner == null) {
throw new ArgumentNullException("owner");
}
_owner = owner;
_eventArgument = eventArgument;
}
[
DefaultValue(false),
]
public override bool UseSubmitBehavior {
get {
return false;
}
set {
// This is an internal sealed class so we know the setter is never called.
throw new InvalidOperationException();
}
}
protected override PostBackOptions GetPostBackOptions() {
// _owner.Page may be null in the designer
if (!String.IsNullOrEmpty(_eventArgument) && _owner.Page != null) {
PostBackOptions options = new PostBackOptions(_owner, _eventArgument);
options.ClientSubmit = true;
return options;
}
return base.GetPostBackOptions();
}
}
}
// 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
- SplashScreen.cs
- XmlSerializationGeneratedCode.cs
- SecureStringHasher.cs
- Nullable.cs
- Configuration.cs
- CustomAttributeBuilder.cs
- FieldTemplateUserControl.cs
- StringBlob.cs
- TextEditorSelection.cs
- OleTxTransactionInfo.cs
- TextSelectionHelper.cs
- PropVariant.cs
- UIInitializationException.cs
- AutomationElement.cs
- HtmlForm.cs
- Span.cs
- StyleXamlTreeBuilder.cs
- JsonEncodingStreamWrapper.cs
- WindowPattern.cs
- ArrayWithOffset.cs
- XmlSchemaAttributeGroupRef.cs
- IgnoreFileBuildProvider.cs
- ReliabilityContractAttribute.cs
- EdmValidator.cs
- AnchorEditor.cs
- StatusBarItemAutomationPeer.cs
- PropertyPathWorker.cs
- AssemblyFilter.cs
- ParagraphVisual.cs
- DataKeyCollection.cs
- AssemblyResourceLoader.cs
- Propagator.ExtentPlaceholderCreator.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- HashMembershipCondition.cs
- ContractDescription.cs
- FixedPosition.cs
- Size.cs
- TransformerTypeCollection.cs
- ColorKeyFrameCollection.cs
- ToRequest.cs
- StrongNameUtility.cs
- InputLanguageProfileNotifySink.cs
- DispatcherOperation.cs
- base64Transforms.cs
- DataBinding.cs
- DataGridViewComboBoxEditingControl.cs
- ListViewInsertionMark.cs
- ColumnCollectionEditor.cs
- _emptywebproxy.cs
- SessionViewState.cs
- FontSizeConverter.cs
- CurrencyWrapper.cs
- MobileUITypeEditor.cs
- TreeView.cs
- Axis.cs
- WebPartAddingEventArgs.cs
- XD.cs
- KeyValueSerializer.cs
- Parser.cs
- Literal.cs
- RSAPKCS1SignatureDeformatter.cs
- DataExpression.cs
- regiisutil.cs
- HeaderElement.cs
- DynamicArgumentDesigner.xaml.cs
- DataServiceQueryContinuation.cs
- MetaModel.cs
- AtomMaterializerLog.cs
- ProjectionCamera.cs
- DataObjectAttribute.cs
- ColorBlend.cs
- InputBindingCollection.cs
- WorkflowQueue.cs
- EntryWrittenEventArgs.cs
- LookupBindingPropertiesAttribute.cs
- ProviderMetadata.cs
- ReferenceTypeElement.cs
- Literal.cs
- Mutex.cs
- RootProfilePropertySettingsCollection.cs
- ReadOnlyObservableCollection.cs
- StreamUpdate.cs
- GZipUtils.cs
- Line.cs
- Root.cs
- ArgumentException.cs
- TypeTypeConverter.cs
- ByteStreamMessageEncodingElement.cs
- DataControlLinkButton.cs
- VirtualDirectoryMappingCollection.cs
- HtmlInputRadioButton.cs
- QuadraticBezierSegment.cs
- SymDocumentType.cs
- DifferencingCollection.cs
- CssClassPropertyAttribute.cs
- StringValidatorAttribute.cs
- QueryResponse.cs
- MetaForeignKeyColumn.cs
- DynamicILGenerator.cs
- ZipIOExtraField.cs