Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlImageButton.cs / 1305376 / DataControlImageButton.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 ImageButton used within a DataControl. /// [SupportsEventValidation] internal sealed class DataControlImageButton : ImageButton { IPostBackContainer _container; string _callbackArgument; bool _enableCallback; internal DataControlImageButton(IPostBackContainer container) { _container = container; } public override bool CausesValidation { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.CannotSetValidationOnDataControlButtons)); } } internal void EnableCallback(string argument) { _enableCallback = true; _callbackArgument = argument; } protected sealed override PostBackOptions GetPostBackOptions() { if (_container != null) { return _container.GetPostBackOptions(this); } return base.GetPostBackOptions(); } protected internal override void Render(HtmlTextWriter writer) { SetCallbackProperties(); base.Render(writer); } private void SetCallbackProperties() { if (_enableCallback) { ICallbackContainer _callbackContainer = _container as ICallbackContainer; if (_callbackContainer != null) { string callbackScript = _callbackContainer.GetCallbackScript(this, _callbackArgument); if (!String.IsNullOrEmpty(callbackScript)) { this.OnClientClick = callbackScript; } } } } } } // 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
- ItemCollection.cs
- DetailsViewDeletedEventArgs.cs
- SqlRowUpdatedEvent.cs
- Matrix.cs
- ObfuscateAssemblyAttribute.cs
- CompilerCollection.cs
- Script.cs
- RegistryConfigurationProvider.cs
- XmlResolver.cs
- BindingGraph.cs
- TraceSource.cs
- UserMapPath.cs
- EllipticalNodeOperations.cs
- InkCanvasSelectionAdorner.cs
- DBDataPermissionAttribute.cs
- TrustManager.cs
- Journal.cs
- MetabaseServerConfig.cs
- ComponentConverter.cs
- LogicalExpressionTypeConverter.cs
- validationstate.cs
- StringInfo.cs
- SymDocumentType.cs
- DbParameterCollection.cs
- HttpContext.cs
- SelfIssuedTokenFactoryCredential.cs
- ImageCodecInfo.cs
- NestPullup.cs
- StorageBasedPackageProperties.cs
- CellCreator.cs
- Point.cs
- LexicalChunk.cs
- ExpressionHelper.cs
- PrivacyNoticeElement.cs
- ComponentSerializationService.cs
- NameValueConfigurationCollection.cs
- HtmlPhoneCallAdapter.cs
- Listbox.cs
- TextAdaptor.cs
- ExpressionLexer.cs
- UIElement.cs
- XmlSchemaSimpleTypeUnion.cs
- HwndTarget.cs
- UdpDiscoveryEndpoint.cs
- DefaultTextStore.cs
- UriWriter.cs
- TrackingLocationCollection.cs
- DataListCommandEventArgs.cs
- Range.cs
- RSAOAEPKeyExchangeDeformatter.cs
- xamlnodes.cs
- NativeMethods.cs
- XPathNode.cs
- LinkDescriptor.cs
- TransformCollection.cs
- PropertyInformation.cs
- OleDbReferenceCollection.cs
- XsdBuilder.cs
- DataRecordInternal.cs
- ActivitySurrogate.cs
- DesignerCalendarAdapter.cs
- NullableLongAverageAggregationOperator.cs
- SmiConnection.cs
- LogWriteRestartAreaState.cs
- MethodToken.cs
- ConnectionPoolManager.cs
- Matrix3D.cs
- BooleanProjectedSlot.cs
- _SSPIWrapper.cs
- ProviderUtil.cs
- InstanceBehavior.cs
- EntityKeyElement.cs
- PostBackOptions.cs
- RTLAwareMessageBox.cs
- PageAdapter.cs
- UIElementCollection.cs
- ParentQuery.cs
- ClientRuntime.cs
- IgnoreSectionHandler.cs
- EntityDesignerDataSourceView.cs
- SqlTriggerContext.cs
- EmptyCollection.cs
- ClientBuildManager.cs
- OleDbTransaction.cs
- M3DUtil.cs
- AutoScrollExpandMessageFilter.cs
- DataGridViewColumn.cs
- ExpressionEditorAttribute.cs
- MediaContextNotificationWindow.cs
- SHA512.cs
- TreeView.cs
- Message.cs
- ProjectionCamera.cs
- UnmanagedMemoryStream.cs
- SessionStateSection.cs
- AccessText.cs
- BamlRecordWriter.cs
- UrlMapping.cs
- TypeHelpers.cs
- ReferenceService.cs