Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / DataGridLinkButton.cs / 1 / DataGridLinkButton.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 DataGrid. /// [SupportsEventValidation] internal sealed class DataGridLinkButton : LinkButton { internal DataGridLinkButton() {} protected internal override void Render(HtmlTextWriter writer) { SetForeColor(); base.Render(writer); } ////// In HTML hyperlinks always use the browser's link color. /// For the DataGrid, 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. /// private void SetForeColor() { if (ControlStyle.IsSet(System.Web.UI.WebControls.Style.PROP_FORECOLOR) == false) { Color hyperLinkForeColor; Control control = this; for (int i = 0; i < 3; i++) { control = control.Parent; Debug.Assert(((i == 0) && (control is TableCell)) || ((i == 1) && (control is TableRow)) || ((i == 2) && (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
- TextReader.cs
- ConfigDefinitionUpdates.cs
- ToolStripItemTextRenderEventArgs.cs
- StylusPlugin.cs
- RoutedEventArgs.cs
- LogExtentCollection.cs
- XmlQueryCardinality.cs
- BitStack.cs
- StylusEditingBehavior.cs
- TextViewElement.cs
- TTSVoice.cs
- PageParserFilter.cs
- FixedTextContainer.cs
- GridViewHeaderRowPresenter.cs
- Int32Rect.cs
- InputEventArgs.cs
- BatchServiceHost.cs
- NegationPusher.cs
- ActivityValidator.cs
- Matrix3D.cs
- IPEndPoint.cs
- QilVisitor.cs
- SqlGatherProducedAliases.cs
- Size.cs
- DynamicObjectAccessor.cs
- NativeMethods.cs
- ResponseStream.cs
- SortFieldComparer.cs
- BamlTreeNode.cs
- RemotingConfiguration.cs
- ProtocolsConfigurationHandler.cs
- CodeChecksumPragma.cs
- MetadataHelper.cs
- IndexedSelectQueryOperator.cs
- TypeKeyValue.cs
- AssemblyContextControlItem.cs
- PolyLineSegment.cs
- DataControlImageButton.cs
- ClosableStream.cs
- TextDecoration.cs
- TextDecorationCollection.cs
- WCFBuildProvider.cs
- Double.cs
- ObjectContextServiceProvider.cs
- BitmapEffect.cs
- DefaultProfileManager.cs
- ForwardPositionQuery.cs
- GradientStop.cs
- DefaultSection.cs
- PrimitiveDataContract.cs
- X509Certificate.cs
- LambdaCompiler.Unary.cs
- ToolStripLabel.cs
- AssemblyHash.cs
- CommandHelper.cs
- ExceptQueryOperator.cs
- ResourceReader.cs
- ParameterToken.cs
- Bezier.cs
- CryptoConfig.cs
- util.cs
- TraceContextRecord.cs
- EncoderReplacementFallback.cs
- EndPoint.cs
- XpsPartBase.cs
- SystemFonts.cs
- ProfileProvider.cs
- DbSourceParameterCollection.cs
- KeyPullup.cs
- PerformanceCounterPermissionEntry.cs
- COAUTHINFO.cs
- ToolboxComponentsCreatingEventArgs.cs
- ScriptComponentDescriptor.cs
- InitializationEventAttribute.cs
- XhtmlTextWriter.cs
- SerializationObjectManager.cs
- Interfaces.cs
- BitmapImage.cs
- FacetDescriptionElement.cs
- DrawListViewSubItemEventArgs.cs
- ExtendedProtectionPolicy.cs
- RectIndependentAnimationStorage.cs
- RootContext.cs
- XmlHierarchicalEnumerable.cs
- GeneralTransform3DCollection.cs
- Int16AnimationUsingKeyFrames.cs
- NotSupportedException.cs
- UIHelper.cs
- ParamArrayAttribute.cs
- Operators.cs
- FixUp.cs
- webproxy.cs
- PrinterUnitConvert.cs
- DragAssistanceManager.cs
- SqlConnectionStringBuilder.cs
- CorrelationTokenTypeConvertor.cs
- FrameworkReadOnlyPropertyMetadata.cs
- OutputScope.cs
- CollectionEditVerbManager.cs
- CodeExporter.cs