Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MailAddressCollection.cs
- _LazyAsyncResult.cs
- EDesignUtil.cs
- DataServiceProcessingPipelineEventArgs.cs
- Validator.cs
- Font.cs
- DependencyObjectValidator.cs
- httpserverutility.cs
- ConsoleCancelEventArgs.cs
- Binding.cs
- BinaryCommonClasses.cs
- HttpRequestCacheValidator.cs
- TraceListener.cs
- InvokeMethod.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- Nullable.cs
- UpdateCompiler.cs
- PassportPrincipal.cs
- LZCodec.cs
- WebControlParameterProxy.cs
- TreeViewItem.cs
- Internal.cs
- ExecutionEngineException.cs
- x509store.cs
- TrackingStringDictionary.cs
- TimeSpanValidator.cs
- ControlPaint.cs
- AppLevelCompilationSectionCache.cs
- RedirectionProxy.cs
- Mutex.cs
- MetadataPropertyvalue.cs
- StructuralType.cs
- ConfigurationStrings.cs
- FileSecurity.cs
- ArglessEventHandlerProxy.cs
- SqlOuterApplyReducer.cs
- ProfileGroupSettings.cs
- CodeCastExpression.cs
- TraceSource.cs
- Shape.cs
- Splitter.cs
- AffineTransform3D.cs
- UrlMappingsModule.cs
- LocatorBase.cs
- Vector.cs
- TableItemStyle.cs
- EntityContainer.cs
- Shape.cs
- LineServices.cs
- ActiveXHost.cs
- DesignerActionPropertyItem.cs
- XsdBuildProvider.cs
- MemoryRecordBuffer.cs
- SettingsPropertyCollection.cs
- FreezableDefaultValueFactory.cs
- DesignerPainter.cs
- MaterialCollection.cs
- XmlSchemaSet.cs
- BuildManager.cs
- Highlights.cs
- ComboBoxRenderer.cs
- SystemInformation.cs
- PerformanceCounterCategory.cs
- StaticFileHandler.cs
- WrappedReader.cs
- DataServiceQueryOfT.cs
- XmlReader.cs
- BindingParameterCollection.cs
- GridViewCellAutomationPeer.cs
- TextSearch.cs
- _ConnectStream.cs
- GrammarBuilderDictation.cs
- Point.cs
- SqlCommand.cs
- RSAPKCS1SignatureDeformatter.cs
- DuplicateContext.cs
- ConfigurationManagerInternalFactory.cs
- Rfc4050KeyFormatter.cs
- DescendantQuery.cs
- ElementMarkupObject.cs
- InitializationEventAttribute.cs
- ToolStripContentPanel.cs
- LoginCancelEventArgs.cs
- DocumentPageView.cs
- CustomError.cs
- X509ClientCertificateCredentialsElement.cs
- PictureBox.cs
- ResourceDisplayNameAttribute.cs
- InvokeSchedule.cs
- Metadata.cs
- GridViewPageEventArgs.cs
- SetterBaseCollection.cs
- IdentityHolder.cs
- HwndAppCommandInputProvider.cs
- UniqueConstraint.cs
- SqlUDTStorage.cs
- OutputCacheSettingsSection.cs
- GeneralTransform3DTo2DTo3D.cs
- translator.cs
- EncoderExceptionFallback.cs