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
- DesignerAttribute.cs
- ToolBarTray.cs
- FlowLayoutPanel.cs
- XmlSchemaAny.cs
- wgx_exports.cs
- BuildProviderCollection.cs
- Converter.cs
- GlyphRunDrawing.cs
- ToolStripRenderer.cs
- ToolStripLocationCancelEventArgs.cs
- ForwardPositionQuery.cs
- DataPagerFieldItem.cs
- FormsAuthenticationModule.cs
- SequenceDesigner.cs
- WebHttpEndpoint.cs
- CreateUserErrorEventArgs.cs
- DivideByZeroException.cs
- NotificationContext.cs
- AuthenticationSection.cs
- FieldNameLookup.cs
- TextBlockAutomationPeer.cs
- CodeDomLoader.cs
- PreProcessor.cs
- login.cs
- UpdatePanelTriggerCollection.cs
- PartitionedDataSource.cs
- DesignerOptionService.cs
- StyleSelector.cs
- PropertyDescriptorComparer.cs
- SimpleApplicationHost.cs
- GregorianCalendarHelper.cs
- Material.cs
- RuntimeResourceSet.cs
- RenderData.cs
- ActivityTypeDesigner.xaml.cs
- QuarticEase.cs
- PrePostDescendentsWalker.cs
- SByte.cs
- DerivedKeySecurityTokenStub.cs
- DBDataPermission.cs
- TypeHelper.cs
- NavigationProgressEventArgs.cs
- Journal.cs
- StaticContext.cs
- TextRangeProviderWrapper.cs
- MultiPropertyDescriptorGridEntry.cs
- TaskbarItemInfo.cs
- AppSettingsReader.cs
- EditingCoordinator.cs
- ComboBox.cs
- SchemaConstraints.cs
- XhtmlBasicLiteralTextAdapter.cs
- OleDbErrorCollection.cs
- StaticSiteMapProvider.cs
- VisualBasicSettings.cs
- TextRangeProviderWrapper.cs
- XmlSchemaCollection.cs
- WebBrowserContainer.cs
- FilteredDataSetHelper.cs
- ExcludePathInfo.cs
- __ConsoleStream.cs
- OdbcCommand.cs
- SecurityPolicySection.cs
- DbTypeMap.cs
- ByteStreamMessageEncoderFactory.cs
- SeekStoryboard.cs
- BatchParser.cs
- DrawingGroup.cs
- DataSourceView.cs
- ServiceDefaults.cs
- LocationSectionRecord.cs
- Soap.cs
- TraceRecord.cs
- ThreadAttributes.cs
- ContainerActivationHelper.cs
- SafeWaitHandle.cs
- SerializerProvider.cs
- ObjectSpanRewriter.cs
- EntityModelBuildProvider.cs
- AspNetHostingPermission.cs
- Sql8ConformanceChecker.cs
- WebPartChrome.cs
- XmlParserContext.cs
- TextTreeTextNode.cs
- ContractsBCL.cs
- MimeTypePropertyAttribute.cs
- VectorConverter.cs
- XmlArrayItemAttribute.cs
- HtmlControl.cs
- TreeNodeCollection.cs
- ActiveXHost.cs
- HttpInputStream.cs
- Graphics.cs
- XmlChildEnumerator.cs
- DeferredElementTreeState.cs
- HttpApplication.cs
- ListViewInsertionMark.cs
- Utils.cs
- TextRunCache.cs
- TargetControlTypeCache.cs