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
- X509Certificate.cs
- EncoderFallback.cs
- PatternMatcher.cs
- CodeObject.cs
- Claim.cs
- BindStream.cs
- StopRoutingHandler.cs
- FragmentNavigationEventArgs.cs
- StringUtil.cs
- WindowsTab.cs
- AdornerLayer.cs
- WebPartConnectionCollection.cs
- X509Certificate2Collection.cs
- DrawingImage.cs
- CaretElement.cs
- ConstNode.cs
- OperationParameterInfoCollection.cs
- PermissionSet.cs
- OutOfMemoryException.cs
- StrokeFIndices.cs
- SystemUnicastIPAddressInformation.cs
- SoapWriter.cs
- DataGridTextColumn.cs
- AssemblyAttributes.cs
- Permission.cs
- WebBrowserBase.cs
- LogicalTreeHelper.cs
- InternalConfigHost.cs
- DataBoundLiteralControl.cs
- FileDialog_Vista.cs
- XmlDataSource.cs
- ConcurrencyMode.cs
- WebBrowser.cs
- InheritanceAttribute.cs
- altserialization.cs
- TextBlock.cs
- UserPersonalizationStateInfo.cs
- DropShadowEffect.cs
- BaseCollection.cs
- SqlGenericUtil.cs
- ProfilePropertyNameValidator.cs
- LicFileLicenseProvider.cs
- __FastResourceComparer.cs
- SByte.cs
- Tool.cs
- MdbDataFileEditor.cs
- ObfuscateAssemblyAttribute.cs
- WsiProfilesElementCollection.cs
- JournalEntry.cs
- TextDpi.cs
- BaseResourcesBuildProvider.cs
- objectquery_tresulttype.cs
- DataBoundControlParameterTarget.cs
- SamlAuthorizationDecisionStatement.cs
- IndexOutOfRangeException.cs
- ColorMatrix.cs
- Converter.cs
- RuleInfoComparer.cs
- UidPropertyAttribute.cs
- WebPartChrome.cs
- Rotation3D.cs
- RequestNavigateEventArgs.cs
- InheritanceAttribute.cs
- GreaterThanOrEqual.cs
- RegionInfo.cs
- ImplicitInputBrush.cs
- ChannelHandler.cs
- Matrix.cs
- TcpChannelFactory.cs
- WebFaultClientMessageInspector.cs
- PinnedBufferMemoryStream.cs
- ConditionCollection.cs
- ApplicationManager.cs
- XmlDesignerDataSourceView.cs
- XmlDataLoader.cs
- SqlConnectionFactory.cs
- PermissionSetTriple.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- MediaContext.cs
- DataGridTable.cs
- DispatchChannelSink.cs
- MethodCallExpression.cs
- ReturnValue.cs
- WorkflowTraceTransfer.cs
- WindowsImpersonationContext.cs
- EventLogEntryCollection.cs
- CaseStatement.cs
- LayoutEvent.cs
- SerializationEventsCache.cs
- CallbackHandler.cs
- HostingMessageProperty.cs
- AssociationTypeEmitter.cs
- QueryOptionExpression.cs
- IndexedSelectQueryOperator.cs
- StringReader.cs
- InProcStateClientManager.cs
- ConfigXmlCDataSection.cs
- EntityDataSourceMemberPath.cs
- DefaultValueConverter.cs
- Italic.cs