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
- XpsS0ValidatingLoader.cs
- Base64Stream.cs
- OdbcConnectionPoolProviderInfo.cs
- StateWorkerRequest.cs
- PropertyMapper.cs
- ViewStateException.cs
- CellIdBoolean.cs
- StateBag.cs
- DefaultBindingPropertyAttribute.cs
- ConfigurationException.cs
- InvalidContentTypeException.cs
- AnimationException.cs
- QueryInterceptorAttribute.cs
- MSAAEventDispatcher.cs
- OutputCacheProfileCollection.cs
- Pair.cs
- HotCommands.cs
- ComponentDispatcherThread.cs
- RangeBase.cs
- ExpressionTextBox.xaml.cs
- SectionInformation.cs
- FacetValueContainer.cs
- Geometry3D.cs
- SelectionProcessor.cs
- BroadcastEventHelper.cs
- TimeManager.cs
- IdlingCommunicationPool.cs
- ClaimSet.cs
- ProfileProvider.cs
- QuadraticBezierSegment.cs
- MappingException.cs
- Pair.cs
- Encoder.cs
- FilteredDataSetHelper.cs
- Maps.cs
- FixedSOMPage.cs
- MenuBase.cs
- RecognizedAudio.cs
- BamlLocalizationDictionary.cs
- SafeTokenHandle.cs
- RangeBaseAutomationPeer.cs
- FileDialogCustomPlacesCollection.cs
- NodeLabelEditEvent.cs
- EntityClassGenerator.cs
- AsyncPostBackTrigger.cs
- OutputCacheProfile.cs
- SourceFileBuildProvider.cs
- Help.cs
- SqlDataSourceDesigner.cs
- TypeConverterAttribute.cs
- DbProviderFactories.cs
- LogExtent.cs
- CustomCategoryAttribute.cs
- unsafenativemethodsother.cs
- DataGridViewTopLeftHeaderCell.cs
- ThicknessConverter.cs
- Misc.cs
- RequestCacheManager.cs
- ByteRangeDownloader.cs
- Journal.cs
- XmlText.cs
- LineServicesCallbacks.cs
- StringCollectionMarkupSerializer.cs
- SafeNativeMethods.cs
- BrowsableAttribute.cs
- SourceItem.cs
- GeometryValueSerializer.cs
- ProfileManager.cs
- ListViewSelectEventArgs.cs
- XpsFixedDocumentReaderWriter.cs
- TextRange.cs
- MessageBox.cs
- AnnotationDocumentPaginator.cs
- SQLBinaryStorage.cs
- SoapExtensionStream.cs
- XPathCompileException.cs
- SizeF.cs
- EntityProviderServices.cs
- MessageLogTraceRecord.cs
- AssemblyAttributes.cs
- DataGridColumn.cs
- ContainsRowNumberChecker.cs
- DecimalConverter.cs
- SchemaExporter.cs
- SqlConnectionManager.cs
- TableCellCollection.cs
- xml.cs
- StringFunctions.cs
- TypePresenter.xaml.cs
- URLAttribute.cs
- Link.cs
- LogStream.cs
- NameTable.cs
- WebPartEventArgs.cs
- MenuDesigner.cs
- UserControl.cs
- CustomPopupPlacement.cs
- MetadataConversionError.cs
- ConfigurationValues.cs
- Int32RectValueSerializer.cs