Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlImageButton.cs / 1 / 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; } } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NgenServicingAttributes.cs
- ListViewGroupConverter.cs
- FileInfo.cs
- MemberPath.cs
- IpcClientChannel.cs
- XslVisitor.cs
- StorageAssociationTypeMapping.cs
- ColorAnimationUsingKeyFrames.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- RouteTable.cs
- NamedPipeConnectionPoolSettingsElement.cs
- DrawingGroupDrawingContext.cs
- ScaleTransform.cs
- HeaderedContentControl.cs
- MenuItemCollection.cs
- ToolboxCategoryItems.cs
- OleDbDataAdapter.cs
- UserControl.cs
- GenericTypeParameterConverter.cs
- XPathNodeIterator.cs
- COM2ExtendedBrowsingHandler.cs
- NavigationCommands.cs
- TextRangeEdit.cs
- CompilerParameters.cs
- WsdlHelpGeneratorElement.cs
- SelfIssuedSamlTokenFactory.cs
- ConfigurationSectionGroup.cs
- XmlSortKeyAccumulator.cs
- PeerEndPoint.cs
- NumericUpDown.cs
- keycontainerpermission.cs
- XamlParser.cs
- DataGridViewRowPostPaintEventArgs.cs
- CodeSubDirectory.cs
- KnownBoxes.cs
- XhtmlBasicValidatorAdapter.cs
- X509ChainPolicy.cs
- FormattedText.cs
- ButtonBase.cs
- CodeParameterDeclarationExpression.cs
- CapabilitiesSection.cs
- MdiWindowListItemConverter.cs
- AudioSignalProblemOccurredEventArgs.cs
- WebSysDisplayNameAttribute.cs
- UpdateDelegates.Generated.cs
- SparseMemoryStream.cs
- ToolStripDropDown.cs
- OutOfProcStateClientManager.cs
- QualifiedId.cs
- ButtonChrome.cs
- QuaternionAnimationBase.cs
- Sequence.cs
- Unit.cs
- Baml2006Reader.cs
- RepeatInfo.cs
- ScriptReference.cs
- XmlIlTypeHelper.cs
- WebControlsSection.cs
- InternalCompensate.cs
- RuntimeWrappedException.cs
- MeasureData.cs
- PointHitTestResult.cs
- HtmlControlDesigner.cs
- HtmlInputHidden.cs
- InvokeAction.cs
- ProxyWebPartManager.cs
- RNGCryptoServiceProvider.cs
- SpoolingTaskBase.cs
- TableCellCollection.cs
- PeerObject.cs
- CornerRadiusConverter.cs
- XmlNodeComparer.cs
- DbProviderFactory.cs
- Membership.cs
- MenuEventArgs.cs
- UpdateEventArgs.cs
- DataGridViewMethods.cs
- Query.cs
- DataPager.cs
- TimeSpanStorage.cs
- EntityContainerEmitter.cs
- TypeLibConverter.cs
- DataObjectSettingDataEventArgs.cs
- PagesSection.cs
- TabControl.cs
- XmlSerializationWriter.cs
- StorageRoot.cs
- CompilerParameters.cs
- OleDbMetaDataFactory.cs
- GeneralEndpointIdentity.cs
- SpeechAudioFormatInfo.cs
- GridEntryCollection.cs
- StringStorage.cs
- Expander.cs
- ExceptionHandlerDesigner.cs
- propertytag.cs
- NetTcpBindingCollectionElement.cs
- columnmapfactory.cs
- LineVisual.cs
- ItemContainerGenerator.cs