Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Cast.cs
- TransformerInfoCollection.cs
- OrthographicCamera.cs
- BamlResourceDeserializer.cs
- SQLChars.cs
- ProviderSettingsCollection.cs
- CultureInfo.cs
- StringFormat.cs
- DataGridViewRowEventArgs.cs
- XsdValidatingReader.cs
- GroupQuery.cs
- QueryOptionExpression.cs
- AtomPub10CategoriesDocumentFormatter.cs
- ISAPIWorkerRequest.cs
- Vector3DConverter.cs
- Color.cs
- SystemColors.cs
- ProxyManager.cs
- MessageFault.cs
- CssClassPropertyAttribute.cs
- SelectionRange.cs
- Rijndael.cs
- KeyboardEventArgs.cs
- Socket.cs
- XmlChildNodes.cs
- ControlValuePropertyAttribute.cs
- MultiPageTextView.cs
- SchemeSettingElementCollection.cs
- AppDomainFactory.cs
- SmiEventSink.cs
- ContractInferenceHelper.cs
- ChangeTracker.cs
- _UriSyntax.cs
- CodeRegionDirective.cs
- SecurityTokenProvider.cs
- TabletCollection.cs
- ResetableIterator.cs
- InputElement.cs
- CompilerState.cs
- GenericIdentity.cs
- HitTestResult.cs
- SocketInformation.cs
- Sentence.cs
- TextPointerBase.cs
- BackoffTimeoutHelper.cs
- MulticastDelegate.cs
- ReturnType.cs
- RemoteWebConfigurationHostStream.cs
- BoundColumn.cs
- FixedFlowMap.cs
- UnmanagedHandle.cs
- TextEffectCollection.cs
- WindowsFormsDesignerOptionService.cs
- QueryOperator.cs
- safePerfProviderHandle.cs
- DataRowView.cs
- RenderingBiasValidation.cs
- ContactManager.cs
- RealizationContext.cs
- ConstantExpression.cs
- WebCategoryAttribute.cs
- HwndHost.cs
- CharacterMetrics.cs
- AuthenticationConfig.cs
- ColumnWidthChangingEvent.cs
- ExternalCalls.cs
- OleDbSchemaGuid.cs
- StringArrayConverter.cs
- SimpleParser.cs
- IgnoreDataMemberAttribute.cs
- OleDbEnumerator.cs
- NumericUpDownAccelerationCollection.cs
- DictionaryEditChange.cs
- XsltConvert.cs
- PolyBezierSegment.cs
- ReliableSessionBindingElementImporter.cs
- TreeNodeConverter.cs
- IndicFontClient.cs
- Pair.cs
- BamlRecordHelper.cs
- Marshal.cs
- AbstractExpressions.cs
- NetworkInformationPermission.cs
- ListCollectionView.cs
- DateTimeEditor.cs
- DebuggerService.cs
- Dump.cs
- Int32Rect.cs
- ImageClickEventArgs.cs
- ByteStorage.cs
- FrameworkObject.cs
- SystemIPGlobalStatistics.cs
- JoinTreeSlot.cs
- DbReferenceCollection.cs
- MatrixAnimationUsingKeyFrames.cs
- BitmapEffectGroup.cs
- ConstraintManager.cs
- ServiceReference.cs
- ActiveDesignSurfaceEvent.cs
- LabelEditEvent.cs