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
- AndCondition.cs
- TdsParameterSetter.cs
- TypeGeneratedEventArgs.cs
- PKCS1MaskGenerationMethod.cs
- DateTimeConstantAttribute.cs
- HandleTable.cs
- BitmapEffectInputConnector.cs
- ValidationErrorInfo.cs
- RowUpdatingEventArgs.cs
- MouseButtonEventArgs.cs
- Crc32.cs
- HtmlInputRadioButton.cs
- CatalogUtil.cs
- DescendentsWalkerBase.cs
- ConnectionManagementElementCollection.cs
- ToolStripItemClickedEventArgs.cs
- XmlEncodedRawTextWriter.cs
- DBSqlParserTable.cs
- EnumConverter.cs
- TextDecoration.cs
- ControlParameter.cs
- XmlBinaryReader.cs
- IsolatedStoragePermission.cs
- InternalBase.cs
- DataServiceQueryOfT.cs
- BitmapDownload.cs
- IsolatedStoragePermission.cs
- Semaphore.cs
- SecurityUniqueId.cs
- DataBindingHandlerAttribute.cs
- DPCustomTypeDescriptor.cs
- DebugTraceHelper.cs
- FixedSOMTextRun.cs
- XPathChildIterator.cs
- ComplexType.cs
- TrackBar.cs
- DataGridView.cs
- CircleHotSpot.cs
- DoubleLinkList.cs
- CompilerCollection.cs
- StrokeNode.cs
- ServiceProviders.cs
- MenuEventArgs.cs
- baseaxisquery.cs
- TimeSpan.cs
- Parallel.cs
- Triangle.cs
- PanningMessageFilter.cs
- SqlExpander.cs
- CommandID.cs
- SafeMarshalContext.cs
- TypefaceCollection.cs
- IgnoreFlushAndCloseStream.cs
- PartialClassGenerationTask.cs
- DelayDesigner.cs
- SerializationHelper.cs
- OrderedDictionary.cs
- SetUserLanguageRequest.cs
- PerformanceCountersElement.cs
- Connector.xaml.cs
- PathFigureCollection.cs
- DesignConnectionCollection.cs
- CaseKeyBox.ViewModel.cs
- ShimAsPublicXamlType.cs
- CacheHelper.cs
- GridViewHeaderRowPresenter.cs
- FolderLevelBuildProviderCollection.cs
- CodeParameterDeclarationExpression.cs
- JournalEntryStack.cs
- PropertyToken.cs
- WebPartVerbsEventArgs.cs
- OleDbDataAdapter.cs
- UnsafeNativeMethods.cs
- CustomErrorsSectionWrapper.cs
- ConfigurationStrings.cs
- WmlControlAdapter.cs
- ColorBlend.cs
- MachineSettingsSection.cs
- baseshape.cs
- activationcontext.cs
- WebConfigurationHost.cs
- LocalValueEnumerator.cs
- StreamUpgradeProvider.cs
- SiteMapDataSource.cs
- VerticalAlignConverter.cs
- GridViewCommandEventArgs.cs
- CLSCompliantAttribute.cs
- EntityClientCacheKey.cs
- GACMembershipCondition.cs
- MatrixUtil.cs
- DesignerSerializationVisibilityAttribute.cs
- cookiecontainer.cs
- FixedSOMLineRanges.cs
- HotSpotCollectionEditor.cs
- DashStyle.cs
- ScriptRef.cs
- DataObjectAttribute.cs
- __Filters.cs
- RawStylusInputCustomData.cs
- ManagedIStream.cs