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
- ComponentGlyph.cs
- MarkupCompiler.cs
- HTMLTagNameToTypeMapper.cs
- IndexingContentUnit.cs
- PairComparer.cs
- LayoutExceptionEventArgs.cs
- ParameterModifier.cs
- DataListAutoFormat.cs
- Odbc32.cs
- EditorPartChrome.cs
- CounterSample.cs
- UpDownBase.cs
- StylusPoint.cs
- FileAuthorizationModule.cs
- DoubleLinkListEnumerator.cs
- CommonServiceBehaviorElement.cs
- OneOfElement.cs
- TextComposition.cs
- COM2EnumConverter.cs
- RequestNavigateEventArgs.cs
- TextSyndicationContentKindHelper.cs
- IncrementalReadDecoders.cs
- NumericExpr.cs
- HtmlTable.cs
- ToolStripItemImageRenderEventArgs.cs
- FaultContractAttribute.cs
- Hex.cs
- CalendarAutoFormat.cs
- KeysConverter.cs
- MarshalDirectiveException.cs
- GenericWebPart.cs
- MailMessage.cs
- ToolStripCustomTypeDescriptor.cs
- SqlClientWrapperSmiStream.cs
- OLEDB_Util.cs
- ParagraphVisual.cs
- ETagAttribute.cs
- XmlSchemaAnnotated.cs
- HttpInputStream.cs
- OleDbError.cs
- TextRangeProviderWrapper.cs
- AutomationPropertyInfo.cs
- XmlUtilWriter.cs
- ControlPropertyNameConverter.cs
- Privilege.cs
- SqlInternalConnectionSmi.cs
- StateMachine.cs
- DataGridSortCommandEventArgs.cs
- Setter.cs
- PointLight.cs
- Effect.cs
- MatrixCamera.cs
- ServiceNameElementCollection.cs
- XmlMembersMapping.cs
- CodeParameterDeclarationExpressionCollection.cs
- UpWmlMobileTextWriter.cs
- ContainerParagraph.cs
- RowToParametersTransformer.cs
- WebPartVerbsEventArgs.cs
- AssemblyNameProxy.cs
- XmlSchemaSequence.cs
- RowToParametersTransformer.cs
- ErrorFormatterPage.cs
- MemberRelationshipService.cs
- LongTypeConverter.cs
- InputReportEventArgs.cs
- CustomError.cs
- ViewPort3D.cs
- HttpChannelHelper.cs
- CharAnimationUsingKeyFrames.cs
- EarlyBoundInfo.cs
- XmlSchemaAnyAttribute.cs
- ToolBarPanel.cs
- IdentitySection.cs
- HyperLink.cs
- TextServicesContext.cs
- List.cs
- Membership.cs
- TextPatternIdentifiers.cs
- CheckoutException.cs
- XhtmlMobileTextWriter.cs
- webproxy.cs
- Walker.cs
- PermissionListSet.cs
- Vars.cs
- DependencySource.cs
- RelatedCurrencyManager.cs
- InternalCache.cs
- UiaCoreProviderApi.cs
- QueuePathEditor.cs
- SqlUnionizer.cs
- AnonymousIdentificationSection.cs
- QilReplaceVisitor.cs
- WebPartExportVerb.cs
- ProtectedConfiguration.cs
- PropertyItem.cs
- StickyNoteContentControl.cs
- DocumentOrderQuery.cs
- RenderDataDrawingContext.cs
- Point.cs