Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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();
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IISMapPath.cs
- ListViewGroup.cs
- AdRotatorDesigner.cs
- ResourceProperty.cs
- Math.cs
- RequestNavigateEventArgs.cs
- CreateCardRequest.cs
- ElementProxy.cs
- CatalogZoneBase.cs
- Hex.cs
- StylusTip.cs
- HotSpot.cs
- XmlMembersMapping.cs
- WorkflowPageSetupDialog.cs
- MetadataCache.cs
- CaseInsensitiveOrdinalStringComparer.cs
- _AutoWebProxyScriptHelper.cs
- DynamicResourceExtension.cs
- BaseCodeDomTreeGenerator.cs
- SimpleFileLog.cs
- URLString.cs
- DefaultObjectMappingItemCollection.cs
- EmbossBitmapEffect.cs
- RightsManagementEncryptionTransform.cs
- LayoutTableCell.cs
- DefaultValueTypeConverter.cs
- XhtmlBasicObjectListAdapter.cs
- Compiler.cs
- Activator.cs
- TabPage.cs
- PersonalizableAttribute.cs
- TargetFrameworkAttribute.cs
- ImageMapEventArgs.cs
- ComponentDispatcherThread.cs
- NonSerializedAttribute.cs
- DetailsViewUpdateEventArgs.cs
- PagePropertiesChangingEventArgs.cs
- HttpCachePolicyBase.cs
- GcHandle.cs
- SafeLibraryHandle.cs
- LifetimeServices.cs
- SafeLibraryHandle.cs
- MarkupProperty.cs
- TreeNode.cs
- CompilerGeneratedAttribute.cs
- CompilationRelaxations.cs
- DockPatternIdentifiers.cs
- ConsoleTraceListener.cs
- ItemAutomationPeer.cs
- ImageSourceValueSerializer.cs
- TraceSection.cs
- ChildChangedEventArgs.cs
- MSAAWinEventWrap.cs
- UTF32Encoding.cs
- FormattedText.cs
- AssemblyUtil.cs
- DataGridViewRowsAddedEventArgs.cs
- RoleServiceManager.cs
- WriteableBitmap.cs
- DataServiceSaveChangesEventArgs.cs
- DuplicateWaitObjectException.cs
- CellPartitioner.cs
- _StreamFramer.cs
- XmlLangPropertyAttribute.cs
- ColumnResizeAdorner.cs
- Script.cs
- SmtpClient.cs
- DataGridViewSelectedColumnCollection.cs
- BitmapEffect.cs
- DependencyPropertyAttribute.cs
- HttpStreamXmlDictionaryReader.cs
- DataGridViewDataErrorEventArgs.cs
- TextEmbeddedObject.cs
- PersonalizationEntry.cs
- DodSequenceMerge.cs
- StatusBarPanel.cs
- ProfilePropertySettings.cs
- TokenizerHelper.cs
- XmlSchemaObjectCollection.cs
- CustomAttribute.cs
- ReturnValue.cs
- SerializationStore.cs
- DataGridColumnHeaderAutomationPeer.cs
- Stackframe.cs
- UnsafeNativeMethodsPenimc.cs
- InheritablePropertyChangeInfo.cs
- RMPublishingDialog.cs
- ExtensionDataReader.cs
- CustomAttributeBuilder.cs
- RootContext.cs
- TableItemStyle.cs
- UnwrappedTypesXmlSerializerManager.cs
- IteratorDescriptor.cs
- DataServiceProviderWrapper.cs
- UnmanagedMarshal.cs
- XsdSchemaFileEditor.cs
- Win32PrintDialog.cs
- WorkItem.cs
- BaseValidatorDesigner.cs
- EncodedStreamFactory.cs