Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlImageButton.cs / 2 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DrawingAttributesDefaultValueFactory.cs
- EncryptedType.cs
- Emitter.cs
- BrushProxy.cs
- Geometry3D.cs
- MdiWindowListItemConverter.cs
- BinaryObjectWriter.cs
- StubHelpers.cs
- OleServicesContext.cs
- ProvideValueServiceProvider.cs
- CompositeFontFamily.cs
- NullableFloatSumAggregationOperator.cs
- XPathSingletonIterator.cs
- HttpListenerContext.cs
- InputQueue.cs
- FixedNode.cs
- AutoSizeComboBox.cs
- ProviderCollection.cs
- CounterCreationData.cs
- NameValueSectionHandler.cs
- BrushProxy.cs
- CategoriesDocumentFormatter.cs
- RoleService.cs
- WebPartsSection.cs
- WebScriptServiceHost.cs
- ChannelSinkStacks.cs
- SqlWorkflowInstanceStoreLock.cs
- InlineCollection.cs
- ContentFileHelper.cs
- SqlCachedBuffer.cs
- MatrixAnimationBase.cs
- DelegatingTypeDescriptionProvider.cs
- VisualTransition.cs
- Paragraph.cs
- StrokeNodeData.cs
- EdgeProfileValidation.cs
- OrderedDictionary.cs
- _UriSyntax.cs
- Native.cs
- WebPageTraceListener.cs
- Literal.cs
- SourceInterpreter.cs
- SplitterCancelEvent.cs
- UnsafeNativeMethods.cs
- ScrollContentPresenter.cs
- ColorMatrix.cs
- NetworkInterface.cs
- ReferenceConverter.cs
- ToolStripPanelCell.cs
- EnumUnknown.cs
- TextProperties.cs
- ExtensionSimplifierMarkupObject.cs
- DropShadowBitmapEffect.cs
- XmlKeywords.cs
- WindowsAuthenticationEventArgs.cs
- ValidationRuleCollection.cs
- regiisutil.cs
- Hyperlink.cs
- XamlSerializer.cs
- ImportContext.cs
- BindStream.cs
- AttributeCollection.cs
- DataComponentMethodGenerator.cs
- ExpressionLink.cs
- DispatcherSynchronizationContext.cs
- CompoundFileDeflateTransform.cs
- Decoder.cs
- DesignerRegionMouseEventArgs.cs
- DiscoveryCallbackBehavior.cs
- GradientBrush.cs
- DataControlPagerLinkButton.cs
- BindStream.cs
- Variant.cs
- ScopeCollection.cs
- DebuggerAttributes.cs
- ProvidePropertyAttribute.cs
- SecureConversationVersion.cs
- HierarchicalDataTemplate.cs
- ToolStripContainer.cs
- isolationinterop.cs
- NullEntityWrapper.cs
- Parser.cs
- AssertFilter.cs
- XhtmlBasicTextBoxAdapter.cs
- MultitargetingHelpers.cs
- DbProviderConfigurationHandler.cs
- LocalFileSettingsProvider.cs
- DesignBindingEditor.cs
- ExtenderProvidedPropertyAttribute.cs
- ActivityBindForm.Designer.cs
- HtmlInputButton.cs
- GridViewRowPresenterBase.cs
- DetailsView.cs
- DataTableReader.cs
- FormView.cs
- SortKey.cs
- NavigationService.cs
- LocalizabilityAttribute.cs
- SafeMILHandleMemoryPressure.cs
- RawMouseInputReport.cs