Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ZoneButton.cs / 1305376 / 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
- ActivityXRefPropertyEditor.cs
- InvokeBase.cs
- UnsafeNativeMethods.cs
- DocComment.cs
- CollectionsUtil.cs
- SqlConnectionPoolGroupProviderInfo.cs
- IODescriptionAttribute.cs
- ListMarkerSourceInfo.cs
- LinqDataSourceSelectEventArgs.cs
- ModifierKeysConverter.cs
- ForceCopyBuildProvider.cs
- UnsafeNativeMethods.cs
- ExpressionConverter.cs
- RuntimeResourceSet.cs
- Roles.cs
- NetDataContractSerializer.cs
- EntityConnectionStringBuilderItem.cs
- ExpressionPrinter.cs
- Point3DKeyFrameCollection.cs
- CodeAccessSecurityEngine.cs
- XamlFilter.cs
- safex509handles.cs
- FixUp.cs
- FontInfo.cs
- XmlSubtreeReader.cs
- TextReader.cs
- CompilationLock.cs
- QilStrConcatenator.cs
- ConstraintCollection.cs
- ReliabilityContractAttribute.cs
- StatusBarPanelClickEvent.cs
- HGlobalSafeHandle.cs
- MonitorWrapper.cs
- DataGridCommandEventArgs.cs
- HighlightOverlayGlyph.cs
- WorkflowPersistenceContext.cs
- Debug.cs
- RelationshipWrapper.cs
- DispatcherExceptionFilterEventArgs.cs
- ColorAnimation.cs
- FillErrorEventArgs.cs
- ChannelManager.cs
- ColorConvertedBitmap.cs
- XmlSerializationReader.cs
- AuthenticationSchemesHelper.cs
- TextRangeBase.cs
- PhotoPrintingIntent.cs
- TableStyle.cs
- ToolboxItemAttribute.cs
- ModelTreeEnumerator.cs
- ResetableIterator.cs
- NonBatchDirectoryCompiler.cs
- WebPartManagerInternals.cs
- TaskCanceledException.cs
- UnaryQueryOperator.cs
- LayoutEvent.cs
- CodeTypeDelegate.cs
- WebServiceMethodData.cs
- InProcStateClientManager.cs
- XmlAttributeProperties.cs
- MultipartIdentifier.cs
- FacetChecker.cs
- LocalizedNameDescriptionPair.cs
- XmlWriterDelegator.cs
- RoutedUICommand.cs
- BuildProvidersCompiler.cs
- SplitterCancelEvent.cs
- SslStreamSecurityBindingElement.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- RangeValidator.cs
- DesignerLoader.cs
- Condition.cs
- XPathException.cs
- HtmlElementEventArgs.cs
- Base64Stream.cs
- ListenerUnsafeNativeMethods.cs
- MimeTypeAttribute.cs
- DoubleKeyFrameCollection.cs
- OptimisticConcurrencyException.cs
- _ListenerResponseStream.cs
- AppDomainAttributes.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- TableLayoutSettings.cs
- QuotedStringWriteStateInfo.cs
- RegexFCD.cs
- NativeMethods.cs
- TypeDescriptorContext.cs
- PeerToPeerException.cs
- PolyLineSegment.cs
- WorkflowDebuggerSteppingAttribute.cs
- NullableDecimalMinMaxAggregationOperator.cs
- ThemeableAttribute.cs
- ReaderWriterLock.cs
- SafeThreadHandle.cs
- CanonicalXml.cs
- COM2PictureConverter.cs
- WindowsTitleBar.cs
- XmlSchemaSimpleTypeList.cs
- EntityDataSourceValidationException.cs
- IssuedTokenServiceCredential.cs