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
- IUnknownConstantAttribute.cs
- WebPartDescriptionCollection.cs
- LookupTables.cs
- OAVariantLib.cs
- CodeSubDirectoriesCollection.cs
- AuthenticationManager.cs
- Baml2006ReaderSettings.cs
- EntityException.cs
- XmlWhitespace.cs
- ResourcesBuildProvider.cs
- WSMessageEncoding.cs
- RepeatInfo.cs
- UriScheme.cs
- SpotLight.cs
- EntityDataReader.cs
- SerialPinChanges.cs
- EncodingStreamWrapper.cs
- ToolStripContainerDesigner.cs
- SafeSecurityHandles.cs
- PenLineCapValidation.cs
- XmlValidatingReader.cs
- ElementUtil.cs
- DbTransaction.cs
- DirectoryInfo.cs
- ComponentEvent.cs
- QilList.cs
- TdsParserStaticMethods.cs
- SqlNamer.cs
- ConnectionProviderAttribute.cs
- CompositionCommandSet.cs
- webbrowsersite.cs
- ForEachDesigner.xaml.cs
- SoapAttributeOverrides.cs
- AvTraceDetails.cs
- DateTimeConverter2.cs
- filewebrequest.cs
- IPEndPoint.cs
- SqlDataSourceSummaryPanel.cs
- Clause.cs
- ThemeableAttribute.cs
- SubordinateTransaction.cs
- VisualTreeHelper.cs
- GeometryHitTestResult.cs
- CrossContextChannel.cs
- XmlSchemaDatatype.cs
- FramingFormat.cs
- WindowsGraphicsCacheManager.cs
- DoubleAnimationClockResource.cs
- ImageCodecInfoPrivate.cs
- ControlValuePropertyAttribute.cs
- Perspective.cs
- XmlSchemaAttributeGroupRef.cs
- GenericsInstances.cs
- SystemUnicastIPAddressInformation.cs
- LineGeometry.cs
- DataRowCollection.cs
- RadioButtonAutomationPeer.cs
- NavigationProperty.cs
- FontSource.cs
- ObjectReferenceStack.cs
- Descriptor.cs
- ThicknessKeyFrameCollection.cs
- SecUtil.cs
- WindowsAltTab.cs
- XsltFunctions.cs
- IisTraceListener.cs
- InkCanvasSelectionAdorner.cs
- CodeDomDesignerLoader.cs
- precedingquery.cs
- Timer.cs
- XamlSerializerUtil.cs
- SRGSCompiler.cs
- ComplexLine.cs
- dataSvcMapFileLoader.cs
- XmlSchemaComplexType.cs
- ConfigXmlText.cs
- FontNameConverter.cs
- File.cs
- MessagePartSpecification.cs
- Nullable.cs
- PathFigureCollection.cs
- MethodExpr.cs
- SuppressMergeCheckAttribute.cs
- DataServiceRequest.cs
- GeneralTransform3DGroup.cs
- DbConnectionInternal.cs
- ContextMarshalException.cs
- TerminateSequenceResponse.cs
- ExecutedRoutedEventArgs.cs
- HebrewCalendar.cs
- InlineCollection.cs
- ProcessModelSection.cs
- ImageFormatConverter.cs
- NavigationProgressEventArgs.cs
- MailDefinition.cs
- HMACSHA512.cs
- XamlSerializerUtil.cs
- HtmlTableRow.cs
- ValueType.cs
- TextClipboardData.cs