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
- XmlAtomicValue.cs
- ApplicationFileParser.cs
- RemotingException.cs
- DeploymentSection.cs
- DefaultHttpHandler.cs
- EntryPointNotFoundException.cs
- GridItemPatternIdentifiers.cs
- RayMeshGeometry3DHitTestResult.cs
- brushes.cs
- PropertyKey.cs
- Button.cs
- ConfigurationValues.cs
- SystemNetworkInterface.cs
- HttpPostProtocolReflector.cs
- TemplateInstanceAttribute.cs
- ObjectTag.cs
- DependencyPropertyChangedEventArgs.cs
- ErrorHandler.cs
- TableCell.cs
- XamlWriter.cs
- InvalidStoreProtectionKeyException.cs
- EntityTemplateFactory.cs
- XPathNodeInfoAtom.cs
- ToolboxBitmapAttribute.cs
- SecurityRuntime.cs
- CultureTableRecord.cs
- PriorityRange.cs
- DbModificationClause.cs
- GraphicsContext.cs
- MDIWindowDialog.cs
- CodeSubDirectoriesCollection.cs
- Condition.cs
- Rules.cs
- XmlSchemaRedefine.cs
- DocumentSequence.cs
- PerformanceCounterPermissionEntry.cs
- TransferRequestHandler.cs
- HtmlEncodedRawTextWriter.cs
- WorkflowOwnershipException.cs
- RegexStringValidator.cs
- ImageDrawing.cs
- HttpMethodAttribute.cs
- XmlSchemaAttributeGroup.cs
- ClientBuildManager.cs
- SqlTrackingQuery.cs
- ImageListStreamer.cs
- CharacterMetricsDictionary.cs
- HyperlinkAutomationPeer.cs
- InputReferenceExpression.cs
- TextElementEnumerator.cs
- ModifierKeysConverter.cs
- CodeGenerator.cs
- PropertyPushdownHelper.cs
- PropertyValue.cs
- ResourcesBuildProvider.cs
- Button.cs
- ColumnWidthChangedEvent.cs
- IPAddress.cs
- Wrapper.cs
- SafeFileMappingHandle.cs
- HealthMonitoringSectionHelper.cs
- CheckedListBox.cs
- DataTableNewRowEvent.cs
- XmlSchemaExternal.cs
- GeneralTransform3DTo2DTo3D.cs
- ExtractorMetadata.cs
- StringBuilder.cs
- BackgroundWorker.cs
- HtmlInputImage.cs
- UrlUtility.cs
- GlobalizationAssembly.cs
- XmlSiteMapProvider.cs
- StringSorter.cs
- GeometryModel3D.cs
- RawStylusSystemGestureInputReport.cs
- SqlRemoveConstantOrderBy.cs
- ElementUtil.cs
- PerformanceCounterPermissionEntry.cs
- SevenBitStream.cs
- Propagator.ExtentPlaceholderCreator.cs
- DataSourceView.cs
- DataServiceContext.cs
- BoundField.cs
- SystemKeyConverter.cs
- PipeStream.cs
- SerializationSectionGroup.cs
- ExpressionHelper.cs
- ToolStripPanelRenderEventArgs.cs
- WebConfigurationHost.cs
- CachingHintValidation.cs
- ClientSettings.cs
- XmlSchemaNotation.cs
- CompositionTarget.cs
- CommonDialog.cs
- RoutingSection.cs
- RelationshipManager.cs
- DBCSCodePageEncoding.cs
- SR.cs
- ValidatorCompatibilityHelper.cs
- ToolStripKeyboardHandlingService.cs