Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Merger.cs
- DataSetUtil.cs
- ContextQuery.cs
- RoleManagerSection.cs
- PriorityBindingExpression.cs
- XmlElementList.cs
- SessionParameter.cs
- SqlBulkCopyColumnMapping.cs
- StyleTypedPropertyAttribute.cs
- LineMetrics.cs
- Stack.cs
- CodeAttributeArgumentCollection.cs
- CheckoutException.cs
- TextServicesHost.cs
- SafeRegistryHandle.cs
- SQLDateTime.cs
- isolationinterop.cs
- DashStyles.cs
- EditorAttribute.cs
- TraceSection.cs
- AccessText.cs
- Debug.cs
- NotSupportedException.cs
- WebBrowserNavigatedEventHandler.cs
- DecimalKeyFrameCollection.cs
- HttpHandlersSection.cs
- TextMetrics.cs
- XmlTextReaderImplHelpers.cs
- DoubleConverter.cs
- CompressEmulationStream.cs
- StrokeNodeOperations2.cs
- DesignerDataSourceView.cs
- MessageQueuePermissionEntryCollection.cs
- Enum.cs
- ProfileGroupSettingsCollection.cs
- CopyNamespacesAction.cs
- PathFigureCollectionConverter.cs
- LayoutTableCell.cs
- ScrollViewerAutomationPeer.cs
- WindowsAuthenticationModule.cs
- XmlLinkedNode.cs
- PackageRelationshipSelector.cs
- InternalResources.cs
- Style.cs
- XmlnsDictionary.cs
- AppDomainProtocolHandler.cs
- SortableBindingList.cs
- SelectManyQueryOperator.cs
- TemplatePartAttribute.cs
- Clipboard.cs
- MexBindingElement.cs
- TreeBuilderXamlTranslator.cs
- DBSchemaTable.cs
- EntityWrapper.cs
- FormsAuthenticationUser.cs
- ValidationError.cs
- ColumnWidthChangedEvent.cs
- TransformCryptoHandle.cs
- ProfileModule.cs
- URLAttribute.cs
- CharUnicodeInfo.cs
- WindowsTab.cs
- Baml6Assembly.cs
- GridViewItemAutomationPeer.cs
- ProgressChangedEventArgs.cs
- SocketException.cs
- DBDataPermissionAttribute.cs
- EdmToObjectNamespaceMap.cs
- DataGridViewCellMouseEventArgs.cs
- SimpleTypesSurrogate.cs
- Soap11ServerProtocol.cs
- Decorator.cs
- ProfileGroupSettings.cs
- TypeSystem.cs
- HttpRequest.cs
- ContentFileHelper.cs
- UInt16Storage.cs
- Emitter.cs
- InternalsVisibleToAttribute.cs
- ArgIterator.cs
- TimeSpanOrInfiniteConverter.cs
- OdbcDataAdapter.cs
- ObjectFullSpanRewriter.cs
- AmbientLight.cs
- ExpressionBuilderContext.cs
- VectorConverter.cs
- BamlBinaryReader.cs
- PeerTransportListenAddressValidator.cs
- SiteMapNodeItemEventArgs.cs
- InvokeGenerator.cs
- GridViewColumnHeader.cs
- TextServicesCompartmentContext.cs
- OperationGenerator.cs
- followingsibling.cs
- DataSourceProvider.cs
- Graphics.cs
- Size.cs
- WinFormsSpinner.cs
- PopOutPanel.cs
- SqlTriggerAttribute.cs