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
- VideoDrawing.cs
- RelatedEnd.cs
- StringBuilder.cs
- PageOutputQuality.cs
- PropertyMappingExceptionEventArgs.cs
- EventMappingSettings.cs
- StylusTip.cs
- HelpProvider.cs
- TextServicesPropertyRanges.cs
- RawStylusInputCustomDataList.cs
- RadioButtonStandardAdapter.cs
- codemethodreferenceexpression.cs
- UrlMapping.cs
- Cursors.cs
- MemoryStream.cs
- HtmlHistory.cs
- DocobjHost.cs
- UpdateRecord.cs
- SSmlParser.cs
- SafeSystemMetrics.cs
- DetailsViewUpdatedEventArgs.cs
- TraceListeners.cs
- DynamicFilterExpression.cs
- ParallelActivityDesigner.cs
- SafeRegistryHandle.cs
- PathSegmentCollection.cs
- ToolStripMenuItem.cs
- WindowsAuthenticationEventArgs.cs
- DeviceSpecificDesigner.cs
- Base64Encoder.cs
- AsyncContentLoadedEventArgs.cs
- DoWorkEventArgs.cs
- EncodingInfo.cs
- HttpProfileBase.cs
- EmissiveMaterial.cs
- AdPostCacheSubstitution.cs
- CallbackValidator.cs
- AmbientLight.cs
- NumberFunctions.cs
- WebPartDisplayModeEventArgs.cs
- WorkflowTraceTransfer.cs
- NativeMethods.cs
- ProfileManager.cs
- TransformPattern.cs
- TreeNodeBindingCollection.cs
- EventDescriptor.cs
- KeyBinding.cs
- SourceFileBuildProvider.cs
- versioninfo.cs
- DefaultBindingPropertyAttribute.cs
- Underline.cs
- StoryFragments.cs
- WindowsRebar.cs
- entityreference_tresulttype.cs
- ListInitExpression.cs
- FunctionMappingTranslator.cs
- OleDbFactory.cs
- SqlError.cs
- NullableLongSumAggregationOperator.cs
- WebMessageEncodingElement.cs
- ReflectionHelper.cs
- CharacterHit.cs
- PageEventArgs.cs
- RegexMatch.cs
- LinkClickEvent.cs
- ClientUtils.cs
- FormViewInsertEventArgs.cs
- SqlCachedBuffer.cs
- ADMembershipUser.cs
- DoubleAnimationUsingKeyFrames.cs
- MarkupExtensionReturnTypeAttribute.cs
- FixedFlowMap.cs
- WorkflowDesignerMessageFilter.cs
- NoResizeHandleGlyph.cs
- RoleManagerEventArgs.cs
- BaseCAMarshaler.cs
- ListSortDescription.cs
- Marshal.cs
- PropertyInfoSet.cs
- WebPartChrome.cs
- IISMapPath.cs
- StreamGeometry.cs
- DataConnectionHelper.cs
- DesignObjectWrapper.cs
- ACE.cs
- ReflectPropertyDescriptor.cs
- WorkflowQueueInfo.cs
- ProfileInfo.cs
- CodeVariableDeclarationStatement.cs
- autovalidator.cs
- XamlPathDataSerializer.cs
- CollectionViewGroupRoot.cs
- CodeGen.cs
- SafeViewOfFileHandle.cs
- XmlIlTypeHelper.cs
- InvalidCastException.cs
- ContractMapping.cs
- PropertyOrder.cs
- CroppedBitmap.cs
- ImpersonationContext.cs