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
- BaseComponentEditor.cs
- DataKey.cs
- GlyphsSerializer.cs
- ConfigurationPermission.cs
- FrameworkTextComposition.cs
- Native.cs
- ColorConverter.cs
- SemaphoreFullException.cs
- AttributeProviderAttribute.cs
- BindingExpressionBase.cs
- TypeBuilderInstantiation.cs
- PrintPreviewGraphics.cs
- DataGridViewTopRowAccessibleObject.cs
- AnnotationDocumentPaginator.cs
- RequestCachePolicyConverter.cs
- SequentialWorkflowRootDesigner.cs
- GPPOINTF.cs
- Debug.cs
- BodyGlyph.cs
- PipelineComponent.cs
- ProvideValueServiceProvider.cs
- SecurityKeyUsage.cs
- ComContractElement.cs
- ClickablePoint.cs
- ZipPackage.cs
- CommandSet.cs
- QuotedPrintableStream.cs
- WorkflowPrinting.cs
- SqlDataSource.cs
- HotSpotCollection.cs
- StartUpEventArgs.cs
- EditorZone.cs
- FontWeights.cs
- sqlstateclientmanager.cs
- ComponentResourceKey.cs
- RectKeyFrameCollection.cs
- WaitHandleCannotBeOpenedException.cs
- WebSysDefaultValueAttribute.cs
- AnimationStorage.cs
- EditBehavior.cs
- RC2CryptoServiceProvider.cs
- CodeIdentifiers.cs
- PrintPreviewControl.cs
- FastEncoderWindow.cs
- WebPartsPersonalizationAuthorization.cs
- RealProxy.cs
- MarkupObject.cs
- DynamicDataRouteHandler.cs
- CryptoApi.cs
- XhtmlConformanceSection.cs
- TableLayoutPanelCellPosition.cs
- ListViewTableRow.cs
- QueryOutputWriter.cs
- ListSurrogate.cs
- Vector3DKeyFrameCollection.cs
- WrapPanel.cs
- RtfNavigator.cs
- XmlSchemaComplexContentExtension.cs
- UIElement3D.cs
- AttributeAction.cs
- WhitespaceRule.cs
- QilInvokeLateBound.cs
- Storyboard.cs
- SQLRoleProvider.cs
- _SpnDictionary.cs
- HandoffBehavior.cs
- SqlNotificationEventArgs.cs
- HttpRequest.cs
- ResourceAttributes.cs
- IFlowDocumentViewer.cs
- Matrix3DStack.cs
- BehaviorEditorPart.cs
- _CacheStreams.cs
- TreeView.cs
- ProgressBarAutomationPeer.cs
- PrintController.cs
- RelationshipSet.cs
- TrackingStringDictionary.cs
- TokenBasedSetEnumerator.cs
- ByteAnimationBase.cs
- EncryptedType.cs
- Int16AnimationUsingKeyFrames.cs
- XhtmlConformanceSection.cs
- EntityDataSourceContextCreatedEventArgs.cs
- DateTimeFormat.cs
- ContentControl.cs
- MethodToken.cs
- __Error.cs
- NullableDecimalSumAggregationOperator.cs
- LayoutEditorPart.cs
- AttachedPropertiesService.cs
- X509Certificate2.cs
- SmtpSection.cs
- PersistenceProviderDirectory.cs
- SQLGuid.cs
- FormViewInsertEventArgs.cs
- BitmapFrame.cs
- NullableFloatAverageAggregationOperator.cs
- ServiceDescriptionImporter.cs
- DeleteBookmarkScope.cs