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
- MetadataUtil.cs
- ExpandableObjectConverter.cs
- ConvertersCollection.cs
- HostingEnvironmentException.cs
- ServiceOperation.cs
- SqlCacheDependencySection.cs
- WorkflowClientDeliverMessageWrapper.cs
- EarlyBoundInfo.cs
- ObfuscationAttribute.cs
- XmlWrappingReader.cs
- _AutoWebProxyScriptEngine.cs
- ScrollData.cs
- DataBoundLiteralControl.cs
- MarkupCompilePass2.cs
- ServiceNameElement.cs
- PackageRelationshipSelector.cs
- DefaultBindingPropertyAttribute.cs
- DataGridRowHeaderAutomationPeer.cs
- WebBrowserNavigatingEventHandler.cs
- CompModSwitches.cs
- Config.cs
- SetterBaseCollection.cs
- CustomError.cs
- ObjectViewEntityCollectionData.cs
- TextEffect.cs
- PageThemeCodeDomTreeGenerator.cs
- TableRowGroup.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ImageConverter.cs
- WindowsScrollBar.cs
- OdbcConnectionOpen.cs
- XmlAttributes.cs
- StringValidator.cs
- NCryptSafeHandles.cs
- LinqToSqlWrapper.cs
- CapabilitiesPattern.cs
- PauseStoryboard.cs
- Thread.cs
- UITypeEditor.cs
- ProgressBar.cs
- WebEventTraceProvider.cs
- SoapParser.cs
- StructuredType.cs
- LinqDataSource.cs
- TemplateBaseAction.cs
- IconBitmapDecoder.cs
- WebConfigurationHostFileChange.cs
- FormViewDeleteEventArgs.cs
- MissingSatelliteAssemblyException.cs
- Visual3D.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- ValueUtilsSmi.cs
- CommonObjectSecurity.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- KeyEvent.cs
- TextProperties.cs
- HttpConfigurationSystem.cs
- ComponentChangedEvent.cs
- CaseExpr.cs
- SoapProtocolReflector.cs
- RoleGroup.cs
- SpecialFolderEnumConverter.cs
- AttachedPropertyDescriptor.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SecurityException.cs
- XmlEntityReference.cs
- Panel.cs
- GeometryConverter.cs
- CompiledAction.cs
- DataGridViewButtonColumn.cs
- ConnectionsZoneDesigner.cs
- LayoutUtils.cs
- MimeTextImporter.cs
- AffineTransform3D.cs
- XmlProcessingInstruction.cs
- NameValueSectionHandler.cs
- TextTreeDeleteContentUndoUnit.cs
- FrameworkName.cs
- XmlEncoding.cs
- ConsumerConnectionPointCollection.cs
- XmlHierarchicalEnumerable.cs
- PageOutputColor.cs
- NumberFunctions.cs
- Tile.cs
- Pair.cs
- BuildProvidersCompiler.cs
- PcmConverter.cs
- CommandID.cs
- NonClientArea.cs
- VirtualPathUtility.cs
- UnsafeNativeMethods.cs
- InkPresenter.cs
- QueryReaderSettings.cs
- CallbackValidatorAttribute.cs
- Normalization.cs
- GroupBox.cs
- MILUtilities.cs
- SmtpException.cs
- SafeLibraryHandle.cs
- FamilyCollection.cs