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
- HwndSubclass.cs
- PropertyPushdownHelper.cs
- DataSvcMapFileSerializer.cs
- ResourceReader.cs
- ApplicationDirectory.cs
- URLIdentityPermission.cs
- HwndStylusInputProvider.cs
- DataGridSortCommandEventArgs.cs
- NativeMethods.cs
- EntityObject.cs
- ResourceExpressionBuilder.cs
- PropertyGeneratedEventArgs.cs
- CodeBlockBuilder.cs
- GifBitmapEncoder.cs
- SqlWriter.cs
- PrinterSettings.cs
- TrackingDataItemValue.cs
- ConsumerConnectionPointCollection.cs
- LogicalTreeHelper.cs
- HijriCalendar.cs
- WebServiceData.cs
- XhtmlBasicPageAdapter.cs
- LayoutSettings.cs
- BuildManagerHost.cs
- EdmSchemaAttribute.cs
- ResourcePermissionBaseEntry.cs
- Image.cs
- HtmlInputCheckBox.cs
- PropertyCollection.cs
- Rotation3DKeyFrameCollection.cs
- CurrentTimeZone.cs
- BrowserCapabilitiesFactory.cs
- GetMemberBinder.cs
- QuaternionRotation3D.cs
- BufferBuilder.cs
- XmlNodeReader.cs
- JsonFormatWriterGenerator.cs
- FixedSOMLineRanges.cs
- CLRBindingWorker.cs
- RowType.cs
- Vector3DAnimationBase.cs
- EncryptedReference.cs
- Crc32.cs
- ToolStripGrip.cs
- StringFunctions.cs
- ModelChangedEventArgsImpl.cs
- ResolveNameEventArgs.cs
- DataListItemCollection.cs
- OrderByBuilder.cs
- DictionaryEntry.cs
- XPathScanner.cs
- RegistryPermission.cs
- CancellationTokenSource.cs
- _RequestLifetimeSetter.cs
- SplitContainer.cs
- SqlServer2KCompatibilityAnnotation.cs
- ObjectPersistData.cs
- PointCollection.cs
- TransactionOptions.cs
- XmlLinkedNode.cs
- BindingMemberInfo.cs
- TreeIterators.cs
- PersonalizationEntry.cs
- StreamResourceInfo.cs
- DependencyPropertyDescriptor.cs
- TraceInternal.cs
- PropertyValueChangedEvent.cs
- ConfigXmlCDataSection.cs
- SingleResultAttribute.cs
- List.cs
- LocalizabilityAttribute.cs
- InfoCardCryptoHelper.cs
- ScriptMethodAttribute.cs
- ObjectDataSourceDesigner.cs
- VectorAnimationBase.cs
- SpellerHighlightLayer.cs
- WebProxyScriptElement.cs
- input.cs
- DependencyPropertyChangedEventArgs.cs
- ProgressBarRenderer.cs
- NavigatingCancelEventArgs.cs
- FactoryRecord.cs
- FilteredAttributeCollection.cs
- LineGeometry.cs
- InstalledFontCollection.cs
- Substitution.cs
- EventLogPermission.cs
- Socket.cs
- SafeArrayTypeMismatchException.cs
- ClientFormsAuthenticationCredentials.cs
- SymbolTable.cs
- DataSourceCacheDurationConverter.cs
- ClientCultureInfo.cs
- AssertUtility.cs
- BitConverter.cs
- MouseEventArgs.cs
- GeometryModel3D.cs
- UriTemplateQueryValue.cs
- StructuredProperty.cs
- ServerTooBusyException.cs