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
- ListComponentEditorPage.cs
- PEFileEvidenceFactory.cs
- mediaclock.cs
- RandomNumberGenerator.cs
- DesignTimeData.cs
- XPathNodePointer.cs
- PerformanceCountersElement.cs
- ServicesUtilities.cs
- NGCSerializationManagerAsync.cs
- WebScriptClientGenerator.cs
- StylusPoint.cs
- EventNotify.cs
- NetworkInformationPermission.cs
- JpegBitmapDecoder.cs
- SectionInformation.cs
- WorkerRequest.cs
- MediaContext.cs
- SimpleRecyclingCache.cs
- SmtpNegotiateAuthenticationModule.cs
- SystemNetHelpers.cs
- SafeThreadHandle.cs
- ServiceModelExtensionElement.cs
- DataViewManager.cs
- RenderData.cs
- ReceiveCompletedEventArgs.cs
- MetadataPropertyAttribute.cs
- RepeatInfo.cs
- EpmContentSerializer.cs
- SoapBinding.cs
- PerformanceCounterPermissionEntry.cs
- StatusBarPanelClickEvent.cs
- _Semaphore.cs
- ConsoleTraceListener.cs
- EntityContainerEmitter.cs
- Lock.cs
- ServiceCredentialsSecurityTokenManager.cs
- DataConnectionHelper.cs
- ViewDesigner.cs
- TextElementAutomationPeer.cs
- ReturnType.cs
- IconBitmapDecoder.cs
- HandlerFactoryWrapper.cs
- BitmapFrameDecode.cs
- RightsManagementEncryptedStream.cs
- VariableQuery.cs
- FlowLayoutSettings.cs
- Utility.cs
- PlacementWorkspace.cs
- SafeFileMapViewHandle.cs
- PrivilegedConfigurationManager.cs
- XmlWrappingReader.cs
- AssemblyFilter.cs
- CellLabel.cs
- GroupQuery.cs
- CursorEditor.cs
- SQLInt64.cs
- DesignerAdRotatorAdapter.cs
- SynchronizationContext.cs
- SpanIndex.cs
- CopyNodeSetAction.cs
- _ListenerAsyncResult.cs
- SimpleModelProvider.cs
- OdbcConnectionFactory.cs
- Container.cs
- NativeRightsManagementAPIsStructures.cs
- ConfigurationCollectionAttribute.cs
- ActivityStatusChangeEventArgs.cs
- SystemWebCachingSectionGroup.cs
- TransactionInformation.cs
- RTTypeWrapper.cs
- odbcmetadatacollectionnames.cs
- PermissionSet.cs
- Emitter.cs
- DBSqlParserTableCollection.cs
- JsonReader.cs
- BinaryFormatter.cs
- Currency.cs
- NavigationProgressEventArgs.cs
- DefaultAuthorizationContext.cs
- DataBinder.cs
- WorkflowInlining.cs
- DataGridViewRowCollection.cs
- ArgumentsParser.cs
- TextEditorParagraphs.cs
- TraceContext.cs
- CodeCommentStatementCollection.cs
- PenLineJoinValidation.cs
- UserPreferenceChangedEventArgs.cs
- RouteParametersHelper.cs
- _ConnectOverlappedAsyncResult.cs
- ToolBarTray.cs
- XamlFigureLengthSerializer.cs
- XsltOutput.cs
- AutomationPeer.cs
- StylusCaptureWithinProperty.cs
- XamlNamespaceHelper.cs
- StaticFileHandler.cs
- DrawingImage.cs
- RIPEMD160.cs
- HttpCookie.cs