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
- SQLInt16Storage.cs
- WindowsStreamSecurityElement.cs
- LoginView.cs
- XmlElementAttribute.cs
- HyperLinkField.cs
- TreeChangeInfo.cs
- DecoderFallback.cs
- GetWinFXPath.cs
- ConsumerConnectionPoint.cs
- ObjectQueryProvider.cs
- StyleCollectionEditor.cs
- BinHexEncoder.cs
- SqlFunctionAttribute.cs
- DynamicQueryableWrapper.cs
- CounterSet.cs
- StringDictionary.cs
- FixedSOMImage.cs
- TextEmbeddedObject.cs
- ListViewAutomationPeer.cs
- EventMap.cs
- SymbolMethod.cs
- TextEditorDragDrop.cs
- Stackframe.cs
- RuntimeConfigurationRecord.cs
- RemoteTokenFactory.cs
- DispatchWrapper.cs
- ListViewSortEventArgs.cs
- TypeTypeConverter.cs
- ImageMap.cs
- SendDesigner.xaml.cs
- DetailsViewPageEventArgs.cs
- MenuItem.cs
- TraceHandlerErrorFormatter.cs
- ThreadExceptionDialog.cs
- AssemblyAssociatedContentFileAttribute.cs
- SqlClientMetaDataCollectionNames.cs
- FloatSumAggregationOperator.cs
- ResourcePermissionBaseEntry.cs
- PathGeometry.cs
- sqlinternaltransaction.cs
- Context.cs
- RC2CryptoServiceProvider.cs
- SqlFactory.cs
- IPPacketInformation.cs
- Label.cs
- LinqDataSourceView.cs
- ItemCheckEvent.cs
- ToolStripControlHost.cs
- ClientBuildManagerCallback.cs
- VirtualPathData.cs
- ValueTypeFieldReference.cs
- SqlStatistics.cs
- RbTree.cs
- IsolatedStoragePermission.cs
- LoadItemsEventArgs.cs
- FixedDocumentPaginator.cs
- BmpBitmapEncoder.cs
- Evaluator.cs
- NotifyIcon.cs
- SizeLimitedCache.cs
- ColorAnimationBase.cs
- SequentialWorkflowRootDesigner.cs
- RichTextBox.cs
- DataGridViewCellConverter.cs
- CacheOutputQuery.cs
- DataObjectEventArgs.cs
- BaseTemplatedMobileComponentEditor.cs
- SiteOfOriginContainer.cs
- TransactionScope.cs
- InputScopeAttribute.cs
- SeekStoryboard.cs
- FixedPageProcessor.cs
- AnnotationComponentChooser.cs
- SQLDoubleStorage.cs
- AudioFormatConverter.cs
- SqlDataSourceCache.cs
- OleDbStruct.cs
- XmlSchemaComplexContent.cs
- RegistryConfigurationProvider.cs
- ActiveXMessageFormatter.cs
- X509ChainElement.cs
- WindowsGraphicsWrapper.cs
- Compilation.cs
- WebDescriptionAttribute.cs
- ConfigurationStrings.cs
- RadialGradientBrush.cs
- ParallelTimeline.cs
- PropertyInformation.cs
- FileCodeGroup.cs
- ContextMenuStrip.cs
- Pen.cs
- ResumeStoryboard.cs
- TargetConverter.cs
- ObjectFullSpanRewriter.cs
- FixedPageProcessor.cs
- InkCanvasFeedbackAdorner.cs
- PersonalizationStateInfoCollection.cs
- ErrorWrapper.cs
- XmlSchemaAttributeGroup.cs
- SecUtil.cs