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
- RightsManagementProvider.cs
- MeshGeometry3D.cs
- WebBrowsableAttribute.cs
- InstanceNotReadyException.cs
- UIElement.cs
- SafeNativeMethods.cs
- ClientSession.cs
- KeysConverter.cs
- XmlBaseWriter.cs
- CounterSample.cs
- SystemTcpConnection.cs
- OracleInternalConnection.cs
- LinqDataSourceDeleteEventArgs.cs
- DeclaredTypeValidatorAttribute.cs
- DefaultAuthorizationContext.cs
- AuthorizationBehavior.cs
- Pair.cs
- NotFiniteNumberException.cs
- AuthenticatedStream.cs
- SQLByteStorage.cs
- RelationshipEntry.cs
- InfoCardAsymmetricCrypto.cs
- RequestCachePolicy.cs
- Animatable.cs
- WindowsScroll.cs
- DllNotFoundException.cs
- ResizeGrip.cs
- DataGridViewImageColumn.cs
- TraceFilter.cs
- OciLobLocator.cs
- BitmapEffectvisualstate.cs
- ContextMenuStripGroup.cs
- MouseButtonEventArgs.cs
- SoapTypeAttribute.cs
- TableItemPattern.cs
- ExtensionMethods.cs
- StringFreezingAttribute.cs
- DurableInstanceManager.cs
- NamedObject.cs
- ColorAnimationBase.cs
- BatchWriter.cs
- HorizontalAlignConverter.cs
- BypassElementCollection.cs
- IntegrationExceptionEventArgs.cs
- IdnMapping.cs
- OutputCacheProfile.cs
- NameNode.cs
- DataGridViewDataConnection.cs
- OleDbCommand.cs
- ArgumentException.cs
- BulletChrome.cs
- Suspend.cs
- FolderNameEditor.cs
- CodeAttributeDeclarationCollection.cs
- ListItemViewAttribute.cs
- EdgeModeValidation.cs
- ValidationErrorEventArgs.cs
- QuaternionAnimationUsingKeyFrames.cs
- GradientBrush.cs
- TextRangeProviderWrapper.cs
- TextBox.cs
- InstanceKey.cs
- StandardBindingElement.cs
- SafeNativeMethods.cs
- DefaultBinder.cs
- CounterSampleCalculator.cs
- ProxyElement.cs
- DataGridViewComboBoxColumnDesigner.cs
- PhysicalAddress.cs
- WebPartsSection.cs
- KeyValueConfigurationElement.cs
- HtmlValidatorAdapter.cs
- EventSourceCreationData.cs
- SvcMapFileSerializer.cs
- XmlILOptimizerVisitor.cs
- SequenceDesigner.cs
- InvalidDataContractException.cs
- SqlCacheDependency.cs
- CatalogZoneAutoFormat.cs
- ImageFormat.cs
- ResetableIterator.cs
- PopupRootAutomationPeer.cs
- Int32CAMarshaler.cs
- AvTraceDetails.cs
- ConfigurationSectionCollection.cs
- RegexGroup.cs
- ArglessEventHandlerProxy.cs
- MouseWheelEventArgs.cs
- CultureInfoConverter.cs
- WindowsGraphicsWrapper.cs
- BindingMAnagerBase.cs
- iisPickupDirectory.cs
- RtfToXamlReader.cs
- Calendar.cs
- PointAnimationBase.cs
- Normalization.cs
- RC2CryptoServiceProvider.cs
- UTF32Encoding.cs
- XPathBinder.cs
- LazyTextWriterCreator.cs