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
- EventBookmark.cs
- DesigntimeLicenseContextSerializer.cs
- TableProviderWrapper.cs
- ProcessThread.cs
- assemblycache.cs
- PaintEvent.cs
- UnionExpr.cs
- OletxTransactionManager.cs
- UserControl.cs
- ADConnectionHelper.cs
- ChtmlCalendarAdapter.cs
- Queue.cs
- BoundPropertyEntry.cs
- HtmlLiteralTextAdapter.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- Timeline.cs
- IndexedSelectQueryOperator.cs
- Button.cs
- ExpressionWriter.cs
- XmlSerializerAssemblyAttribute.cs
- AuthorizationRule.cs
- SystemWebExtensionsSectionGroup.cs
- AnnotationComponentChooser.cs
- ContourSegment.cs
- DesignerView.Commands.cs
- BaseWebProxyFinder.cs
- DataGridViewRowHeaderCell.cs
- DockPanel.cs
- Ref.cs
- ManualWorkflowSchedulerService.cs
- TrackingServices.cs
- namescope.cs
- xamlnodes.cs
- GridViewRow.cs
- IdentityReference.cs
- SelectionPattern.cs
- DragStartedEventArgs.cs
- OleDbPropertySetGuid.cs
- StringFreezingAttribute.cs
- OutputCacheModule.cs
- SoapAttributeOverrides.cs
- RectAnimationBase.cs
- ExpandCollapseProviderWrapper.cs
- WmlSelectionListAdapter.cs
- HostUtils.cs
- GridViewActionList.cs
- DataDocumentXPathNavigator.cs
- PropertySegmentSerializationProvider.cs
- LicenseContext.cs
- ProjectionPathBuilder.cs
- DynamicUpdateCommand.cs
- XamlPoint3DCollectionSerializer.cs
- ResourceType.cs
- EventRouteFactory.cs
- WrappedReader.cs
- Triangle.cs
- OperationResponse.cs
- HashCodeCombiner.cs
- MemoryMappedView.cs
- MatchAttribute.cs
- DocumentViewerBase.cs
- CountdownEvent.cs
- FocusTracker.cs
- Utils.cs
- SByteStorage.cs
- XsltSettings.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- DataTemplateSelector.cs
- OutputCacheProfile.cs
- DispatcherEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- ImageMap.cs
- X500Name.cs
- ContextMarshalException.cs
- RootBrowserWindowProxy.cs
- Tile.cs
- DataListItemEventArgs.cs
- PropertyBuilder.cs
- X509Chain.cs
- Padding.cs
- ExpressionVisitor.cs
- StretchValidation.cs
- GridViewDesigner.cs
- PolygonHotSpot.cs
- NativeBuffer.cs
- DataGridTemplateColumn.cs
- MultilineStringConverter.cs
- InstanceCreationEditor.cs
- PropertySourceInfo.cs
- XmlCustomFormatter.cs
- VirtualDirectoryMappingCollection.cs
- Slider.cs
- KerberosTokenFactoryCredential.cs
- UnauthorizedWebPart.cs
- HierarchicalDataTemplate.cs
- SqlServer2KCompatibilityAnnotation.cs
- ImageAutomationPeer.cs
- DataSet.cs
- CachedFontFace.cs
- HttpStaticObjectsCollectionWrapper.cs