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
- EmbossBitmapEffect.cs
- UrlEncodedParameterWriter.cs
- Environment.cs
- VirtualPathProvider.cs
- FileIOPermission.cs
- ButtonBase.cs
- ContextMenu.cs
- SqlDependencyUtils.cs
- SHA512.cs
- SystemThemeKey.cs
- DesignerView.Commands.cs
- CommandEventArgs.cs
- NativeMethodsCLR.cs
- DataGridViewUtilities.cs
- Parser.cs
- HttpInputStream.cs
- XmlEventCache.cs
- XmlNavigatorFilter.cs
- OutOfProcStateClientManager.cs
- DataGridAutoFormat.cs
- Dictionary.cs
- BufferedResponseStream.cs
- ConsoleCancelEventArgs.cs
- HttpHeaderCollection.cs
- PolyQuadraticBezierSegment.cs
- GridErrorDlg.cs
- CombinedGeometry.cs
- TypeDescriptorContext.cs
- OpCodes.cs
- ProtocolsConfiguration.cs
- codemethodreferenceexpression.cs
- TypeToken.cs
- BasicHttpSecurityElement.cs
- wmiprovider.cs
- Array.cs
- ContentElement.cs
- XpsColorContext.cs
- SignatureDescription.cs
- XmlSchemaObject.cs
- DescendantOverDescendantQuery.cs
- BitVector32.cs
- SafePEFileHandle.cs
- FontInfo.cs
- FieldMetadata.cs
- HwndHostAutomationPeer.cs
- MouseEventArgs.cs
- TemplateInstanceAttribute.cs
- DbInsertCommandTree.cs
- XmlSchemaException.cs
- EditorPart.cs
- EventPropertyMap.cs
- IISMapPath.cs
- RoleManagerSection.cs
- FileChangesMonitor.cs
- AnonymousIdentificationSection.cs
- WorkBatch.cs
- SubpageParagraph.cs
- METAHEADER.cs
- DataGridPagerStyle.cs
- UnaryExpression.cs
- CommandID.cs
- EntityDataSourceContextCreatingEventArgs.cs
- StrokeCollection.cs
- StylusPointDescription.cs
- LayoutDump.cs
- XmlSchemaSimpleContentRestriction.cs
- HtmlEncodedRawTextWriter.cs
- ActivationServices.cs
- Util.cs
- Propagator.cs
- Scalars.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ContainerParagraph.cs
- HtmlFormWrapper.cs
- DoubleKeyFrameCollection.cs
- AttachmentService.cs
- WebBrowserPermission.cs
- EventArgs.cs
- XmlILIndex.cs
- C14NUtil.cs
- HotSpot.cs
- AssertFilter.cs
- ConstrainedDataObject.cs
- WorkflowViewService.cs
- ReadOnlyCollection.cs
- SingleStorage.cs
- UriExt.cs
- AssemblyCacheEntry.cs
- TraceHandler.cs
- NumberFormatter.cs
- DispatcherExceptionEventArgs.cs
- DataGridTextBoxColumn.cs
- SBCSCodePageEncoding.cs
- MatrixCamera.cs
- Application.cs
- TextLineResult.cs
- SmiGettersStream.cs
- UIPropertyMetadata.cs
- baseaxisquery.cs
- SurrogateSelector.cs