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
- MultiTrigger.cs
- ManipulationStartingEventArgs.cs
- RawStylusSystemGestureInputReport.cs
- PointConverter.cs
- Timer.cs
- WindowsGrip.cs
- ProviderSettingsCollection.cs
- UndirectedGraph.cs
- OpenTypeMethods.cs
- _DisconnectOverlappedAsyncResult.cs
- RowToParametersTransformer.cs
- WSSecurityJan2004.cs
- XmlSchemaSimpleContentExtension.cs
- PathTooLongException.cs
- QilChoice.cs
- QueryResponse.cs
- DirectoryNotFoundException.cs
- _HeaderInfo.cs
- VersionPair.cs
- ConfigXmlComment.cs
- SqlRecordBuffer.cs
- MemoryStream.cs
- AssemblySettingAttributes.cs
- SequenceDesignerAccessibleObject.cs
- XmlSchemaExporter.cs
- DataListItemEventArgs.cs
- DllNotFoundException.cs
- Empty.cs
- ActivityMarkupSerializationProvider.cs
- RoutedCommand.cs
- StateValidator.cs
- DataRecordInfo.cs
- keycontainerpermission.cs
- GenericTextProperties.cs
- SqlDelegatedTransaction.cs
- Normalizer.cs
- ErrorProvider.cs
- SqlFormatter.cs
- RequestCachePolicyConverter.cs
- DPTypeDescriptorContext.cs
- WebPartDisplayMode.cs
- BaseParagraph.cs
- SplashScreen.cs
- ProfilePropertySettings.cs
- TaiwanLunisolarCalendar.cs
- ResXDataNode.cs
- SchemaTableColumn.cs
- InvariantComparer.cs
- CultureSpecificStringDictionary.cs
- Compiler.cs
- HttpCacheVary.cs
- ObjectListCommand.cs
- DataGridViewCellStyleConverter.cs
- Mappings.cs
- Attribute.cs
- ElementHostPropertyMap.cs
- translator.cs
- ElapsedEventArgs.cs
- ISFClipboardData.cs
- CultureInfoConverter.cs
- RegexCode.cs
- EntityTemplateFactory.cs
- InfoCardTrace.cs
- activationcontext.cs
- SharedStream.cs
- CompilerWrapper.cs
- SqlDataSourceDesigner.cs
- ViewValidator.cs
- ListenDesigner.cs
- TreeNodeStyle.cs
- OciHandle.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- StreamHelper.cs
- ScrollProperties.cs
- ExtentKey.cs
- DataBindingList.cs
- AssemblyFilter.cs
- ScriptBehaviorDescriptor.cs
- DictionaryEntry.cs
- TextTreeExtractElementUndoUnit.cs
- WindowsBrush.cs
- ISAPIRuntime.cs
- DataSet.cs
- SoapEnumAttribute.cs
- Matrix.cs
- TrackingServices.cs
- Interlocked.cs
- DataServiceRequest.cs
- ProcessManager.cs
- ByteViewer.cs
- DataTableReader.cs
- StreamHelper.cs
- BaseServiceProvider.cs
- Vector3DAnimation.cs
- ColumnBinding.cs
- DataFormats.cs
- FileChangesMonitor.cs
- PackagePartCollection.cs
- AppSettingsSection.cs
- TextTreeExtractElementUndoUnit.cs