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
- LogPolicy.cs
- SafeSecurityHandles.cs
- ParenExpr.cs
- EntityContainer.cs
- DataBoundControlAdapter.cs
- DbgUtil.cs
- MoveSizeWinEventHandler.cs
- RuntimeIdentifierPropertyAttribute.cs
- BasicDesignerLoader.cs
- StylusButtonCollection.cs
- LicenseException.cs
- SerializationHelper.cs
- SchemaNamespaceManager.cs
- HierarchicalDataBoundControlAdapter.cs
- CodeTypeParameterCollection.cs
- Convert.cs
- SafeCryptoHandles.cs
- GPPOINT.cs
- OleDbConnectionInternal.cs
- TextServicesCompartmentContext.cs
- DeferrableContentConverter.cs
- MiniCustomAttributeInfo.cs
- QilVisitor.cs
- DataGridViewIntLinkedList.cs
- SqlProfileProvider.cs
- WsatProxy.cs
- KeyGestureValueSerializer.cs
- DateTimePickerDesigner.cs
- PositiveTimeSpanValidatorAttribute.cs
- GacUtil.cs
- WindowsFormsEditorServiceHelper.cs
- HuffmanTree.cs
- OleDbInfoMessageEvent.cs
- BidOverLoads.cs
- Pair.cs
- WindowsFormsHostAutomationPeer.cs
- AtomMaterializerLog.cs
- BooleanFunctions.cs
- Floater.cs
- Stack.cs
- AttachmentCollection.cs
- _BasicClient.cs
- RayHitTestParameters.cs
- Utility.cs
- Logging.cs
- WebPartsPersonalization.cs
- WriterOutput.cs
- CheckBoxBaseAdapter.cs
- InvokeHandlers.cs
- SafeNativeMethodsCLR.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ProtocolsConfigurationEntry.cs
- RunWorkerCompletedEventArgs.cs
- StylusEditingBehavior.cs
- EntityProxyTypeInfo.cs
- NetworkStream.cs
- NewArrayExpression.cs
- LocatorBase.cs
- GraphicsContainer.cs
- DataGridViewButtonCell.cs
- HtmlToClrEventProxy.cs
- ProvidePropertyAttribute.cs
- UnmanagedMarshal.cs
- ImageMap.cs
- IsolatedStorageException.cs
- WmlTextBoxAdapter.cs
- BinaryCommonClasses.cs
- CompiledQueryCacheEntry.cs
- Control.cs
- TcpTransportManager.cs
- DbConnectionStringCommon.cs
- SoapProtocolImporter.cs
- COSERVERINFO.cs
- OleDbCommandBuilder.cs
- BindingSourceDesigner.cs
- LabelExpression.cs
- LoginView.cs
- CookielessData.cs
- SafeHandle.cs
- Brushes.cs
- ImageListDesigner.cs
- RawMouseInputReport.cs
- HostingEnvironmentException.cs
- EventBuilder.cs
- XmlSchemaAttributeGroupRef.cs
- EdmFunctions.cs
- ActiveXHost.cs
- figurelength.cs
- SQLConvert.cs
- XPathScanner.cs
- ValueQuery.cs
- IndexedEnumerable.cs
- PerformanceCounterManager.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- Subset.cs
- OdbcParameterCollection.cs
- RectAnimationBase.cs
- AutomationElementIdentifiers.cs
- WebException.cs
- XmlSchemaGroup.cs