Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlButton.cs / 1305376 / DataControlButton.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Drawing; using System.Web.Util; ////// Derived version of Button used within a DataControl. /// [SupportsEventValidation] internal sealed class DataControlButton : Button { IPostBackContainer _container; internal DataControlButton(IPostBackContainer container) { _container = container; } public override bool CausesValidation { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.CannotSetValidationOnDataControlButtons)); } } public override bool UseSubmitBehavior { get { return false; } set { throw new NotSupportedException(); } } protected sealed override PostBackOptions GetPostBackOptions() { PostBackOptions options; if (_container != null) { options = _container.GetPostBackOptions(this); if (Page != null) { options.ClientSubmit = true; } } else { options = base.GetPostBackOptions(); } return options; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Drawing; using System.Web.Util; ////// Derived version of Button used within a DataControl. /// [SupportsEventValidation] internal sealed class DataControlButton : Button { IPostBackContainer _container; internal DataControlButton(IPostBackContainer container) { _container = container; } public override bool CausesValidation { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.CannotSetValidationOnDataControlButtons)); } } public override bool UseSubmitBehavior { get { return false; } set { throw new NotSupportedException(); } } protected sealed override PostBackOptions GetPostBackOptions() { PostBackOptions options; if (_container != null) { options = _container.GetPostBackOptions(this); if (Page != null) { options.ClientSubmit = true; } } else { options = base.GetPostBackOptions(); } return options; } } } // 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
- InlineObject.cs
- XamlReader.cs
- ControlBuilder.cs
- OdbcConnectionHandle.cs
- DateTimeValueSerializerContext.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- XmlSchemaInferenceException.cs
- StorageRoot.cs
- XmlWrappingReader.cs
- DataPointer.cs
- CustomAttribute.cs
- GetImportFileNameRequest.cs
- InkCanvas.cs
- WindowCollection.cs
- GridViewAutomationPeer.cs
- ContainerVisual.cs
- DefaultBinder.cs
- ListViewAutomationPeer.cs
- KeyPressEvent.cs
- CodeCommentStatementCollection.cs
- InternalMappingException.cs
- QilXmlReader.cs
- MetadataCache.cs
- TextBoxAutoCompleteSourceConverter.cs
- SharedStatics.cs
- RegexRunnerFactory.cs
- SQLInt32.cs
- StringCollection.cs
- ListViewItem.cs
- Fault.cs
- MouseCaptureWithinProperty.cs
- SimpleWorkerRequest.cs
- GlobalizationSection.cs
- SqlWriter.cs
- EventHandlerList.cs
- AddressHeaderCollection.cs
- ControlPropertyNameConverter.cs
- SymmetricKeyWrap.cs
- DataColumnChangeEvent.cs
- ViewKeyConstraint.cs
- CellParagraph.cs
- RIPEMD160.cs
- RectangleHotSpot.cs
- ElementNotEnabledException.cs
- NetworkInformationException.cs
- QilTypeChecker.cs
- AsymmetricKeyExchangeDeformatter.cs
- DataSourceHelper.cs
- MapPathBasedVirtualPathProvider.cs
- TextParagraph.cs
- XamlStyleSerializer.cs
- ServicePointManagerElement.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- RequiredAttributeAttribute.cs
- ScrollableControlDesigner.cs
- OdbcEnvironment.cs
- NavigationProperty.cs
- LoadedOrUnloadedOperation.cs
- TriggerBase.cs
- MouseBinding.cs
- XmlNotation.cs
- XPathAncestorIterator.cs
- NumberAction.cs
- _ContextAwareResult.cs
- ToolStripItemDesigner.cs
- XmlFormatExtensionPrefixAttribute.cs
- OdbcErrorCollection.cs
- EnumValAlphaComparer.cs
- RegexCharClass.cs
- FormattedText.cs
- ParameterCollection.cs
- ListMarkerLine.cs
- IconEditor.cs
- CatalogZoneBase.cs
- ServiceDesigner.xaml.cs
- SecurityContextKeyIdentifierClause.cs
- SymLanguageVendor.cs
- CursorInteropHelper.cs
- VisualStateManager.cs
- KeyedQueue.cs
- ClipboardData.cs
- PropertyDescriptorCollection.cs
- RightsController.cs
- ColorTransformHelper.cs
- PrtCap_Public_Simple.cs
- TypeBuilderInstantiation.cs
- Geometry3D.cs
- xsdvalidator.cs
- StorageSetMapping.cs
- Attributes.cs
- PtsPage.cs
- ClientCultureInfo.cs
- EditingCommands.cs
- InternalsVisibleToAttribute.cs
- HtmlLinkAdapter.cs
- RouteUrlExpressionBuilder.cs
- AnimationClock.cs
- PagerSettings.cs
- WebServiceEnumData.cs
- LayoutUtils.cs