Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlButton.cs / 2 / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PropertyValueUIItem.cs
- ListItemsPage.cs
- HwndKeyboardInputProvider.cs
- InputLangChangeEvent.cs
- Int32CollectionConverter.cs
- XamlFxTrace.cs
- NullableDoubleMinMaxAggregationOperator.cs
- NewExpression.cs
- Section.cs
- OptionalMessageQuery.cs
- LineServices.cs
- Point3DKeyFrameCollection.cs
- AccessViolationException.cs
- ScaleTransform.cs
- EUCJPEncoding.cs
- _Semaphore.cs
- ObfuscationAttribute.cs
- UserPreference.cs
- PropertyStore.cs
- FixedPageStructure.cs
- SmiSettersStream.cs
- InputLanguageManager.cs
- XmlDocumentFragment.cs
- HtmlElement.cs
- SerializationInfoEnumerator.cs
- SoapInteropTypes.cs
- XmlEventCache.cs
- Facet.cs
- Process.cs
- AlphabeticalEnumConverter.cs
- DomainConstraint.cs
- ExtensionSimplifierMarkupObject.cs
- SqlProcedureAttribute.cs
- WithParamAction.cs
- IndexOutOfRangeException.cs
- UIElementParaClient.cs
- ParamArrayAttribute.cs
- DataColumnMapping.cs
- SymbolType.cs
- XmlWriter.cs
- DesignerActionTextItem.cs
- _TLSstream.cs
- SerTrace.cs
- updatecommandorderer.cs
- FilterableAttribute.cs
- Int32CollectionValueSerializer.cs
- DataGridViewRowsRemovedEventArgs.cs
- CodeActivityMetadata.cs
- StringWriter.cs
- OneWayChannelFactory.cs
- propertyentry.cs
- MimeMultiPart.cs
- EntitySqlException.cs
- CultureSpecificStringDictionary.cs
- EntityDataSourceSelectingEventArgs.cs
- LicenseManager.cs
- XmlTextReaderImpl.cs
- TraceLog.cs
- WorkflowServiceNamespace.cs
- WriteableBitmap.cs
- FixedPageStructure.cs
- GatewayDefinition.cs
- QueryableDataSourceEditData.cs
- Column.cs
- InternalTransaction.cs
- DataColumnMapping.cs
- ColumnWidthChangingEvent.cs
- CustomTypeDescriptor.cs
- UndirectedGraph.cs
- EdmItemError.cs
- XamlSerializerUtil.cs
- SourceLineInfo.cs
- ErrorFormatterPage.cs
- DataGridCellsPresenter.cs
- SerialPinChanges.cs
- HttpFileCollection.cs
- OdbcConnectionFactory.cs
- SpeechEvent.cs
- XslAstAnalyzer.cs
- XPathQilFactory.cs
- Converter.cs
- ConstructorArgumentAttribute.cs
- WebPartMenu.cs
- ResourceContainerWrapper.cs
- NullableDecimalMinMaxAggregationOperator.cs
- TabControl.cs
- TraceHandler.cs
- shaperfactory.cs
- FieldDescriptor.cs
- AuthorizationSection.cs
- PKCS1MaskGenerationMethod.cs
- NetNamedPipeBindingCollectionElement.cs
- PenCursorManager.cs
- NameTable.cs
- SystemIPGlobalProperties.cs
- webclient.cs
- CodePrimitiveExpression.cs
- DBConnectionString.cs
- Predicate.cs
- DesignSurfaceManager.cs