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
- IntegerCollectionEditor.cs
- NativeMethods.cs
- SqlCommand.cs
- Marshal.cs
- WindowsNonControl.cs
- DefaultMemberAttribute.cs
- IntegerCollectionEditor.cs
- FixedSOMTextRun.cs
- NeutralResourcesLanguageAttribute.cs
- GridViewRowPresenter.cs
- XsltConvert.cs
- CustomValidator.cs
- GeneralTransformGroup.cs
- RuntimeArgumentHandle.cs
- BaseTransportHeaders.cs
- SessionStateSection.cs
- ComplexLine.cs
- MailAddressCollection.cs
- TypeConverter.cs
- ApplicationBuildProvider.cs
- OutputCacheSection.cs
- Size3D.cs
- SecurityToken.cs
- ClientSettingsSection.cs
- NameObjectCollectionBase.cs
- XsdSchemaFileEditor.cs
- SafeRegistryHandle.cs
- DoubleLink.cs
- DataReaderContainer.cs
- SiteMapNodeCollection.cs
- GlyphRunDrawing.cs
- ListenerElementsCollection.cs
- Pointer.cs
- SatelliteContractVersionAttribute.cs
- Select.cs
- SingleObjectCollection.cs
- DataTablePropertyDescriptor.cs
- DesignerListAdapter.cs
- LineBreak.cs
- HtmlAnchor.cs
- DatePickerAutomationPeer.cs
- NavigationHelper.cs
- ComboBox.cs
- GradientStop.cs
- MergePropertyDescriptor.cs
- Subset.cs
- SqlDependencyUtils.cs
- ConstantProjectedSlot.cs
- XmlSchemaSimpleContentExtension.cs
- DataTableReader.cs
- UIntPtr.cs
- EnumerableRowCollectionExtensions.cs
- MonthChangedEventArgs.cs
- UnsafeNetInfoNativeMethods.cs
- FontDialog.cs
- EdmError.cs
- TimeSpan.cs
- MimeTypeAttribute.cs
- CounterNameConverter.cs
- CreateUserWizardDesigner.cs
- ValidationError.cs
- ReadOnlyCollectionBuilder.cs
- RequestDescription.cs
- NoResizeSelectionBorderGlyph.cs
- DiscreteKeyFrames.cs
- BooleanAnimationUsingKeyFrames.cs
- XmlnsCompatibleWithAttribute.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- HtmlShim.cs
- IpcClientManager.cs
- XamlPointCollectionSerializer.cs
- SelectionProviderWrapper.cs
- Soap.cs
- xmlsaver.cs
- MediaElement.cs
- CodeSpit.cs
- HttpProfileGroupBase.cs
- ZipIOExtraFieldElement.cs
- DataControlField.cs
- ComProxy.cs
- Switch.cs
- NetworkInformationException.cs
- Effect.cs
- SingleObjectCollection.cs
- DataRowChangeEvent.cs
- LostFocusEventManager.cs
- BindingGraph.cs
- QueryOptionExpression.cs
- ReferencedCollectionType.cs
- AndAlso.cs
- Enum.cs
- TextFindEngine.cs
- BamlLocalizableResource.cs
- XmlDownloadManager.cs
- CheckBoxList.cs
- DesignerImageAdapter.cs
- EtwTrace.cs
- ServiceHttpModule.cs
- Size.cs
- LastQueryOperator.cs