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
- ParseElementCollection.cs
- SynchronizationHandlesCodeDomSerializer.cs
- EdmItemCollection.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- WebEncodingValidatorAttribute.cs
- PropagationProtocolsTracing.cs
- UnsignedPublishLicense.cs
- UITypeEditor.cs
- RemoteWebConfigurationHostServer.cs
- WebPartHelpVerb.cs
- XmlFormatExtensionAttribute.cs
- BitmapDownload.cs
- ControlValuePropertyAttribute.cs
- DependencyPropertyDescriptor.cs
- XmlSchemaExternal.cs
- Stack.cs
- Object.cs
- __Error.cs
- XNodeNavigator.cs
- XmlSiteMapProvider.cs
- SafeNativeMethods.cs
- CheckBox.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- OleCmdHelper.cs
- AdRotator.cs
- _ListenerAsyncResult.cs
- TriggerAction.cs
- ScriptMethodAttribute.cs
- KnownTypeAttribute.cs
- GradientSpreadMethodValidation.cs
- Parameter.cs
- TypeConverterHelper.cs
- SetStateDesigner.cs
- FontStyleConverter.cs
- WpfKnownMemberInvoker.cs
- WorkflowDesigner.cs
- ChangesetResponse.cs
- TemplatePropertyEntry.cs
- TextTrailingCharacterEllipsis.cs
- XmlHierarchyData.cs
- HuffmanTree.cs
- LinkedList.cs
- ProcessStartInfo.cs
- BasicHttpBinding.cs
- SessionViewState.cs
- Stack.cs
- StylusPlugin.cs
- OdbcConnectionFactory.cs
- HttpTransportBindingElement.cs
- FixUpCollection.cs
- CodeMemberField.cs
- IntranetCredentialPolicy.cs
- List.cs
- CompositeFontInfo.cs
- Win32MouseDevice.cs
- NullableBoolConverter.cs
- ServiceMoniker.cs
- COAUTHIDENTITY.cs
- SqlDataSource.cs
- BaseServiceProvider.cs
- ViewStateException.cs
- BaseValidator.cs
- OpenTypeCommon.cs
- Image.cs
- ExpressionPrinter.cs
- LocationSectionRecord.cs
- ControlBindingsCollection.cs
- ISO2022Encoding.cs
- UserControlBuildProvider.cs
- CancelEventArgs.cs
- LineSegment.cs
- TemplateModeChangedEventArgs.cs
- TypeSchema.cs
- StringWriter.cs
- RequestStatusBarUpdateEventArgs.cs
- HelloMessageApril2005.cs
- OleDbFactory.cs
- FlowThrottle.cs
- ByteConverter.cs
- wgx_sdk_version.cs
- TypeUnloadedException.cs
- TextChangedEventArgs.cs
- ReturnValue.cs
- DataGridViewCheckBoxColumn.cs
- MessageBox.cs
- RepeaterItem.cs
- Stackframe.cs
- TemplatedMailWebEventProvider.cs
- PersonalizationDictionary.cs
- WebPartCatalogAddVerb.cs
- WsdlImporterElementCollection.cs
- DbDataReader.cs
- DecimalAnimationBase.cs
- InheritablePropertyChangeInfo.cs
- ListViewDesigner.cs
- securitymgrsite.cs
- Buffer.cs
- ConfigurationPropertyCollection.cs
- FunctionParameter.cs
- SelectedDatesCollection.cs