Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlPagerLinkButton.cs / 1 / DataControlPagerLinkButton.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 LinkButton used within a DataControl. /// [SupportsEventValidation] internal class DataControlPagerLinkButton : DataControlLinkButton { internal DataControlPagerLinkButton(IPostBackContainer container) : base(container) { } public override bool CausesValidation { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.CannotSetValidationOnPagerButtons)); } } ////// In HTML hyperlinks always use the browser's link color. /// For the DataControl, we want all LinkButtons to honor the ForeColor setting. /// This requires looking up into the control hierarchy to see if either the cell /// or the containing row or table define a ForeColor. /// protected override void SetForeColor() { if (ControlStyle.IsSet(System.Web.UI.WebControls.Style.PROP_FORECOLOR) == false) { Color hyperLinkForeColor; Control control = this; for (int i = 0; i < 6; i++) { control = control.Parent; // pager buttons are usually inside a table that's inside the pager row Debug.Assert(((i == 0) && (control is TableCell)) || ((i == 1) && (control is TableRow)) || ((i == 2) && (control is Table)) || ((i == 3) && (control is TableCell)) || ((i == 4) && (control is TableRow)) || ((i == 5) && (control is Table))); hyperLinkForeColor = ((WebControl)control).ForeColor; if (hyperLinkForeColor != Color.Empty) { ForeColor = hyperLinkForeColor; break; } } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebReferencesBuildProvider.cs
- DoubleCollection.cs
- LinkArea.cs
- OperationDescription.cs
- ImageDrawing.cs
- SystemBrushes.cs
- HyperLinkDataBindingHandler.cs
- QilReference.cs
- XmlTextReader.cs
- SchemaComplexType.cs
- XslTransform.cs
- InputBinding.cs
- EncryptedPackage.cs
- TransformGroup.cs
- COM2ExtendedTypeConverter.cs
- ChangeBlockUndoRecord.cs
- OpenTypeLayoutCache.cs
- LoggedException.cs
- XmlBinaryWriterSession.cs
- CustomAttribute.cs
- GeneralTransform2DTo3D.cs
- ToggleProviderWrapper.cs
- HandleRef.cs
- FormatConvertedBitmap.cs
- _NetRes.cs
- SqlProfileProvider.cs
- ComponentResourceManager.cs
- DataGridViewLinkCell.cs
- Panel.cs
- SqlUnionizer.cs
- DynamicVirtualDiscoSearcher.cs
- ValidationHelper.cs
- RectAnimationBase.cs
- EdmItemError.cs
- MenuItemBindingCollection.cs
- CqlLexerHelpers.cs
- RenderDataDrawingContext.cs
- ScrollPattern.cs
- PointValueSerializer.cs
- UriTemplateTrieNode.cs
- Serializer.cs
- TextBoxBase.cs
- ClientConfigurationHost.cs
- ElementInit.cs
- PrinterResolution.cs
- future.cs
- IISUnsafeMethods.cs
- BindableTemplateBuilder.cs
- COAUTHIDENTITY.cs
- GridViewRowEventArgs.cs
- SimpleRecyclingCache.cs
- MulticastDelegate.cs
- ValidateNames.cs
- HtmlShim.cs
- DesignerImageAdapter.cs
- DbConnectionStringBuilder.cs
- TrackingProfileDeserializationException.cs
- DispatcherHooks.cs
- GeometryHitTestResult.cs
- SecurityHeader.cs
- ConnectionPoint.cs
- Point3DKeyFrameCollection.cs
- ServiceReference.cs
- ContractTypeNameCollection.cs
- LoadWorkflowByInstanceKeyCommand.cs
- Rect3D.cs
- PopupControlService.cs
- CheckBox.cs
- SByteStorage.cs
- FileDialog.cs
- ManualResetEvent.cs
- IfElseDesigner.xaml.cs
- StringInfo.cs
- LogLogRecord.cs
- AliasGenerator.cs
- MethodImplAttribute.cs
- SHA256Managed.cs
- GenerateHelper.cs
- Point3DAnimationUsingKeyFrames.cs
- HierarchicalDataBoundControlAdapter.cs
- MultipleViewPatternIdentifiers.cs
- GridViewRowCollection.cs
- MappingSource.cs
- DocumentPage.cs
- SatelliteContractVersionAttribute.cs
- ProcessingInstructionAction.cs
- UriSection.cs
- ContextStaticAttribute.cs
- TimeoutHelper.cs
- DefinitionBase.cs
- SqlCharStream.cs
- LambdaCompiler.Unary.cs
- OdbcCommandBuilder.cs
- XPathSelfQuery.cs
- AccessibilityApplicationManager.cs
- XmlFormatReaderGenerator.cs
- DataTablePropertyDescriptor.cs
- HttpCapabilitiesBase.cs
- SafeFileHandle.cs
- ConfigurationProviderException.cs